Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#15 seg fault with 1.3.21/FreeBSD running example thread2.cpp

Common_Libraries
open
nobody
Library (32)
5
2012-11-18
2005-11-08
Chronos
No

When I run the very simple thread2.cpp example, I get a
seg fault at the end of the program.

Here is gdb's output:
[nicblais] ~/test/cc> gdb a.out
GNU gdb 6.1.1 [FreeBSD]
<snip>
(gdb) run
Starting program: /home/nicblais/test/cc/a.out
(no debugging symbols found)...(no debugging symbols
found)...(no debugging symbols found)...(no debugging
symbols found)...(no debugging symbols found)...(no
debugging symbols found)...(no debugging symbols
found)...warning: Unable to get location for thread
creation breakpoint: generic error
[New LWP 100133]
(no debugging symbols found)...(no debugging symbols
found)...(no debugging symbols found)...starting father
thread
starting child thread
child start
father end
child end
[New Thread 0x8057600 (LWP 100133)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x8057600 (LWP 100133)]
0x280d4c95 in ost::Thread::close () from
/usr/local/lib/libccgnu2-1.3.so.1
(gdb)

Here's the ouput of ccgnu2-config --flags --stdlibs:
-I/usr/local/include/cc++2 -D_THREAD_SAFE -D_GNU_SOURCE
-I/usr/local/include
-L/usr/local/lib -lccext2 -lccgnu2 -L/usr/local/lib
-lxml2 -lz -L/usr/local/lib -liconv -lm -lz -pthread

Here's the output of uname -a:
FreeBSD clk01a 7.0-CURRENT FreeBSD 7.0-CURRENT #0: Sat
Nov 5 12:12:36 EST 2005
root@clk01a:/usr/obj/usr/src/sys/CLK01A i386

I have the same behavior with FreeBSD's port (1.3.13)
and I send a PR to update it to 1.3.21 (but it still
causes the same seg fault).

thread1.cpp works fine.

Discussion

  • Chronos
    Chronos
    2005-11-08

    • summary: seg fault with 1.3.21/FreeBSD running exemple thread2.cpp --> seg fault with 1.3.21/FreeBSD running example thread2.cpp
     
  • David Sugar
    David Sugar
    2012-11-18

    I don't believe this applies to current library releases...