bugGluster - Bugs: bug #26006, patch to avoid infinite loop on ARM

 
 

bug #26006: patch to avoid infinite loop on ARM

Submitted by:  None
Submitted on:  Thu 26 Mar 2009 11:16:55 AM UTC  
 
Category: GlusterFSSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Porting Issue
Status: PostponedPrivacy: Public
Assigned to: NoneOriginator Name: Anand Avati
Originator Email: -unavailable-Open/Closed: Closed
Release: Operating System: GNU/Linux
Reproducibility: Every Time

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Wed 24 Jun 2009 06:33:01 PM UTC, comment #3:

This bug has been moved to http://bugs.gluster.com

Please track the progress of the bug at http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=52

--
Gowda

Basavanagowda Kanur <gowda>
Project Member
Thu 02 Apr 2009 11:19:32 AM UTC, comment #2:

Thanks for pointing the execute_cmd() case

Anand Avati <avati>
Project Member
Thu 02 Apr 2009 11:04:43 AM UTC, comment #1:

It's not the right patch, not the most portable!

Please take a look on `man 3 fgetc`: int fgetc(FILE *stream);

fgetc return an int! not a char :)

On git master branch it was fixed changing `character` type from char to int.

It should be fixed even for execute_cmd function.

More info and examples could be found here: http://www.network-theory.co.uk/docs/gccintro/gccintro_71.html

(file #17848)

-Deleted Account- <gio_>
Thu 26 Mar 2009 11:16:55 AM UTC, original submission:

Hi,

I had to modify the 'parse_backticks' procedure when building glusterfs-2.0.0rc4 on Linux/ARM because it wasn't properly detecting the EOF so would enter an infinite loop whilst parsing the vol file.

Attached is the patch - it is merely adding a cast to the comparison as both EOF and the return from fgetc are integers, not characters.

I'm not entirely sure why this doesn't affect other platforms, but the patch shouldn't cause any problems elsewhere.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #17805:  glusterfs-2.0.0rc4-eofpatch added by None (732B - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by gowda (Posted a comment)
  • -unavailable- added by avati (Posted a comment)
  • -unavailable- added by gio_ (Updated the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 24 Jun 2009 06:33:01 PM UTCgowdaStatusNone=>Postponed
      Open/ClosedOpen=>Closed
    Thu 02 Apr 2009 11:19:32 AM UTCavatiOriginator Name=>Anand Avati
      Originator Email=>-unavailable-
    Thu 02 Apr 2009 11:04:43 AM UTCgio_Attached File-=>Added glusterfs-git-fgetc-type.patch, #17848
    Thu 26 Mar 2009 11:16:55 AM UTCNoneAttached File-=>Added glusterfs-2.0.0rc4-eofpatch, #17805

    Back to the top


    Powered by Savane 3.1-cleanup1