First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 95628
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Gentoo Shell Tools Herd Bugs <shell-tools@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Goyo Roth <roth@cs.utah.edu>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
detox.simple.patch alters a char variable troublesome on ppc patch Goyo Roth 2005-06-09 20:54 0000 440 bytes Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 95628 depends on: Show dependency tree
Bug 95628 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2005-06-09 20:47 0000
Detox is masked for ppc. This is despite the fact that it compiles because it
does not run. The fix is incredibly simple. I've submitted it to the author, but
he has not responded. I thought gentoo might want to patch it and unmask another
package. 
Unlike intel machines, ppc chars default to unsigned. The author assigned the
results of a function returning an integer to a char and tested it for
negativity, indicating the end of a list. Since the char is unsigned, it is
never negative. Yield: infinite loop in argument parsing. 
The fix: dump the char for an int or explicitly define the char as signed. I've
opted for the latter.
Patch attached. 

Sorry if this isn't the proper forum for such things.

Reproducible: Always
Steps to Reproduce:
1. ebuild /usr/portage/app-misc/detox/detox-1.1.1.ebuild merge
2. detox foo\ bar
3. 

Actual Results:  
Program hangs. gdb reveals it is caught in the cli argument parsing loop for the
reasons described above. 

Expected Results:  
renamed foo\ bar to foo_bar. With my patch, it now does.

An incredibly small patch follows . . .

------- Comment #1 From Goyo Roth 2005-06-09 20:54:07 0000 -------
Created an attachment (id=60963) [edit]
alters a char variable troublesome on ppc

------- Comment #2 From Luca Barbato 2005-06-10 05:45:05 0000 -------
int poptGetNextOpt(poptContext con);

the current code is just WRONG.

please report upstream to use the right size for variables.

------- Comment #3 From Aaron Walker (RETIRED) 2005-06-10 06:21:32 0000 -------
Yeah as Luca pointed it out, the current code is incorrect (not just missing a
'signed' specified).  c needs to be an int, so that also fixes the signed issue.

Fixed in 1.1.1-r1.  Thanks for the report.

------- Comment #4 From Goyo Roth 2005-06-10 18:59:15 0000 -------
(In reply to comment #3)
> Yeah as Luca pointed it out, the current code is incorrect (not just missing a
> 'signed' specified).  c needs to be an int, so that also fixes the signed issue.
> 
> Fixed in 1.1.1-r1.  Thanks for the report.

Yes, I believe I mentioned that:

> The fix: dump the char for an int or explicitly define the char as signed.
I've opted for the latter.

I stuck with the char in hopes that the original author, who surly thought he
was gaining something by using a char rather than something more obvious, would
be more likely to incorporate the patch.

No matter. Thank you much. I'm glad the issue is resolved.

------- Comment #5 From Goyo Roth 2005-06-10 23:19:29 0000 -------
The intent of this fix was to unmask the package on ppc. I see the new version,
but ppc is still masked. What remains to put it into ~ppc?

------- Comment #6 From Aaron Walker (RETIRED) 2005-06-11 04:17:03 0000 -------
That'd be up to the ppc team.

------- Comment #7 From David Holm (RETIRED) 2005-06-12 04:13:13 0000 -------
It's in ~ppc now.

First Last Prev Next    No search results available      Search page      Enter new bug