Bug 176665 - lib3ds breaks with gcc4.0
Summary: lib3ds breaks with gcc4.0
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: lib3ds
Version: 4
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Ralf Corsepius
QA Contact: Fedora Extras Quality Assurance
URL: http://sourceforge.net/tracker/index....
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-12-29 09:28 UTC by Sylvain Rouillard
Modified: 2007-11-30 22:11 UTC (History)
1 user (show)

Fixed In Version: lib3ds-1.2.0-6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-01-10 18:47:54 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Sylvain Rouillard 2005-12-29 09:28:28 UTC
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 07:43:09 UTC
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 14:18:36 UTC
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 18:20:24 UTC
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 18:47:54 UTC
Great! Closing ...


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