Bug 1230 – std.math.poly asm segfaults

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
Linux
Creation time
2007-05-12T14:59:00Z
Last change time
2015-06-09T05:14:58Z
Assigned to
ibuclaw
Creator
larsivar
Depends on
1805

Comments

Comment #0 by larsivar — 2007-05-12T14:59:02Z
The std.math.poly function segfaults on Linux. Can be tested by running the unittests for that module. The unittest passes if the asm block is disabled. The asm works fine with DMD (no segfaults), but Don Clugston says: "It's clear that the asm code for poly() is buggy - it assumes a frame pointer in EBP, but the ABI spec does not mandate the use of frame pointers." Tested with GDC 0.23 and latest svn. The issue has a corresponding ticket for Tango, http://www.dsource.org/projects/tango/ticket/467
Comment #1 by bugzilla — 2007-06-28T22:28:10Z
I'll adjust the doc to mandate the setting up of EBP, unless 'naked' is used.
Comment #2 by larsivar — 2008-01-24T16:40:01Z
This is presumably due to GDC not following the D calling convention at all, which is a major PITA.
Comment #3 by ibuclaw — 2012-09-03T08:16:17Z
D_InlineAsm (and the D Inline Assembler implementation) is no longer part of GDC.