va_list segfault on AMD64
Simon Buerger
krox at gmx.net
Fri Apr 18 09:26:36 PDT 2008
Im compiling the following with gdc-0.25-4.2.3-2ubuntu2 on Ubuntu 8.04
AMD64 and it gets a segmentation fault.
import std.stdio;
void main(){
writefln(42);
}
Writing strings works fine as far as I see. Following is the
stackframe given by gdb. And there you see the reason why I think its
something with the va_list stuff (which is pretty different on AMD64
than x86, because parameters are passed inside registers). But I'm not
really familiar with the internals of phobos, so maybe that guess is
wrong.
#0 0x40cfb9
_D3std6format11doFormatPtrFDFwZvAC8TypeInfoG1S6object13__va_list_tagPvZv9formatArgMFaZv6putstrMFAaZv()
(??:??)
#1 0x40e2d9
_D3std6format11doFormatPtrFDFwZvAC8TypeInfoG1S6object13__va_list_tagPvZv9formatArgMFaZv()
(??:??)
#2 0x40f101
_D3std6format11doFormatPtrFDFwZvAC8TypeInfoG1S6object13__va_list_tagPvZv()
(??:??)
#3 0x40c603
_D3std5stdio7writefxFPS3std1c5stdio6_iobufAC8TypeInfoG1S6object13__va_list_tagiZv()
(??:??)
#4 0x40c85a _D3std5stdio8writeflnFYv() (??:??)
#5 0x402bc0 _Dmain() (bug_test.d:3)
#6 0x4191a7 _D9dgccmain211_d_run_mainUiPPaPUAAaZiZi2goMFZv() (??:??)
#7 0x41925f _d_run_main() (??:??)
#8 0x7ff0414eb1c4 __libc_start_main() (/lib/libc.so.6:??)
#9 0x402b19 _start() (??:??)
More information about the Digitalmars-d-bugs
mailing list