January 09, 2004 synchronized bug on Linux? | ||||
---|---|---|---|---|
| ||||
The following tiny code meet segmentation fault on Linux (Fedora Core1, linux-2.4.22, dmd-0.77 and dmd-0.76):
int main() {
synchronized {
printf("hello\n");
}
return 0
}
I'm sorry I can't understand the cause of this problem.
gdb's log is below.
> gdb sync
runGNU gdb Red Hat Linux (5.3.90-0.20030710.41rh)
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu"...
(no debugging symbols found)...Using host libthread_db library "/lib/tls/libthread_db.so.1".
(gdb) run
Starting program: /home/i/test/d/sync
(no debugging symbols found)...[Thread debugging using libthread_db enabled]
[New Thread -1084559232 (LWP 23716)]
(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1084559232 (LWP 23716)]
0x08048c19 in _d_criticalenter ()
(gdb) where
#0 0x08048c19 in _d_criticalenter ()
#1 0x08049011 in _Dmain ()
#2 0x08049500 in main ()
------------------
shinichiro.h
|
Copyright © 1999-2021 by the D Language Foundation