Bug 176665 - lib3ds breaks with gcc4.0
lib3ds breaks with gcc4.0
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: lib3ds (Show other bugs)
4
x86_64 Linux
medium Severity medium
: ---
: ---
Assigned To: Ralf Corsepius
Fedora Extras Quality Assurance
http://sourceforge.net/tracker/index....
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-12-29 04:28 EST by Sylvain Rouillard
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version: lib3ds-1.2.0-6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-01-10 13:47:54 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Sylvain Rouillard 2005-12-29 04:28:28 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8) Gecko/20051118 Fedora/1.5-0.5.0.rc3 Firefox/1.5

Description of problem:
The current lib3ds version is broken when compiled with gcc4, as reported on the page that can be found at the provided link (http://sourceforge.net/tracker/index.php?func=detail&aid=1249100&group_id=4041&atid=104041).

They also suggest a patch there, that seems to work. I also have been told that -O0 might work, too (i.e. disabling all optimizations).

Unfortunately I cannot be much more accurate in my report, because this was found while  helping debugging a software that uses that lib. If more information is needed, I can always contact this other software developper for more details.

Version-Release number of selected component (if applicable):
1.2.0-5

How reproducible:
Always

Steps to Reproduce:
see description.
  

Additional info:
Comment 1 Ralf Corsepius 2005-12-30 02:43:09 EST
Thanks for the report, but it took me some time to understand this PR.

AFAICT, there are at least 2 separate bugs interacting.

1. The "punned pointers" GCC is warning about.
Here, GCC is right, the code is dirty and isn't valid C.
Very likely GCC's optimization breaks this code.

The appropriate fix is to use temporary variables instead of casting at the
places in question.

2. The float<->double conversions being used in io.c are _very_ questionable.
IMO, this code is broken.

Do you have a simple piece of code to reproduce the bug? Without it, working
around/fixing these issues is hardly possible.
Comment 2 Ralf Corsepius 2006-01-05 09:18:36 EST
I've applied a patch provided by upstream, which is supposed to fix this issue
to *-1.2.0-6 (To be released with the next round of FE updates).

Could you please check if this patch actually fixes your issues?

TIA.
Comment 3 Sylvain Rouillard 2006-01-10 13:20:24 EST
The patch did fix our issue. Thank you for the fix.

As far as I'm concerned, this bug can be closed.

Cheers.
Comment 4 Ralf Corsepius 2006-01-10 13:47:54 EST
Great! Closing ...

Note You need to log in before you can comment on or make changes to this bug.