Issue 853862: 'Demo/embed/' , It crash (original) (raw)
When I try to run the demo under 'Demo/embed/' , It crash, It's something wrong about my Make step?
==========================================
xy2.163.com embed$uname -a
FreeBSD xy2.163.com 4.8-RELEASE-p5 FreeBSD 4.8-
RELEASE-p5 #0: Thu Sep 25 11:42:40 CST 2003
root@xy2.163.com:/usr/home/root/src/sys/compile/DH2G
AME_KERNEL i386
==========================================
xy2.163.com embed$python Python 2.3.2 (#1, Dec 4 2003, 13🔞10) [GCC 2.95.4 20020320 [FreeBSD]] on freebsd4 Type "help", "copyright", "credits" or "license" for more information.
import distutils.sysconfig distutils.sysconfig.get_config_var('LINKFORSHARED') '-Wl,--export-dynamic'
==========================================
xy2.163.com embed$gmake demo
gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-
prototypes -fno-strict-aliasing -I../../Include -I../.. -c -
o demo.o demo.c
gcc -Wl,--export-dynamic demo.o ../../libpython2.3.a -
lreadline -ltermcap -pthread -lutil -lc -lm -o demo
../../libpython2.3.a(posixmodule.o): In function
posix_tmpnam': /home/kyo/work/Python-2.3.2/./Modules/posixmodule.c (.text+0x3c8b): warning: tmpnam() possibly used unsafely; consider using mkstemp() ../../libpython2.3.a(posixmodule.o): In function
posix_tempnam':
/home/kyo/work/Python-2.3.2/./Modules/posixmodule.c
(.text+0x3bee): warning: tempnam() possibly used
unsafely; consider using mkstemp()
/usr/lib/libc_r.so: WARNING! setkey(3) not present in
the system!
/usr/lib/libc_r.so: warning: this program uses gets(),
which is unsafe.
/usr/lib/libc_r.so: warning: mktemp() possibly used
unsafely; consider using mkstemp()
/usr/lib/libc_r.so: WARNING! des_setkey(3) not present
in the system!
/usr/lib/libc_r.so: WARNING! encrypt(3) not present in
the system!
/usr/lib/libc_r.so: warning: this program uses f_prealloc
(), which is not recommended.
/usr/lib/libc_r.so: WARNING! des_cipher(3) not present
in the system!
xy2.163.com embed$./demo
Hello, brave new world
('builtin', 'main', '_codecs', '_sre', '_symtable', 'er rno', 'exceptions', 'gc', 'imp', 'marshal', 'posix', 'signal', 'sys ', 'thread', 'xxsubtype', 'zipimport') ['copy_reg', 'main', 'cjkcodecs.aliases', 'site', 'builti n', 'encodings', 'encodings.encodings', 'posixpath', 'enc odings.codecs', 'cjkcodecs', 'os.path', '_codecs', 'encodin gs.exceptions', 'stat', 'zipimport', 'warnings', 'encodings.ty pes', 'UserDict', 'sys', 'cjkcodecs.encodings', 'codecs', 'ty pes', 'xyzzy', 'signal', 'linecache', 'posix', 'encodings.aliase s', 'exceptions', 'encodings.iso8859_1', 'os'] /usr/home/kyo/work/Python-2.Demo/embed/demo ['./demo']
Goodbye, cruel world Segmentation fault (core dumped)
==========================================
xy2.163.com embed$gdb demo demo.core GNU gdb 4.18 (FreeBSD) Copyright 1998 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-unknown- freebsd"...Deprecated bfd_read called at /usr/home/root/src/gnu/usr.bin/binutils/gdb/../../../../c ontrib/gdb/gdb/dbxread.c line 2627 in elfstab_build_psymtabs Deprecated bfd_read called at /usr/home/root/src/gnu/usr.bin/binutils/gdb/../../../../c ontrib/gdb/gdb/dbxread.c line 933 in fill_symbuf
Core was generated by demo'. Program terminated with signal 11, Segmentation fault. Reading symbols from /usr/lib/libreadline.so.4...done. Reading symbols from /usr/lib/libncurses.so.5...done. Reading symbols from /usr/lib/libutil.so.3...done. Reading symbols from /usr/lib/libc.so.4...done. Reading symbols from /usr/lib/libm.so.2...done. Reading symbols from /usr/lib/libc_r.so.4...done. Reading symbols from /usr/libexec/ld-elf.so.1...done. #0 0x481fcaa8 in .cerror () from /usr/lib/libc.so.4 (gdb) bt #0 0x481fcaa8 in .cerror () from /usr/lib/libc.so.4 #1 0x4828f927 in _exit () from /usr/lib/libc_r.so.4 #2 0x481fc9a7 in exit () from /usr/lib/libc.so.4 #3 0x80a4b5c in Py_FdIsInteractive (fp=0x0, filename=0xbfbffb08 "%
") at Python/pythonrun.c:1547
#4 0x8053d67 in main ()
#5 0x8053bf6 in _start ()
(gdb)