Macports glib issue? bootstrap-emacs (24.3.50) segfaults in g_source_unref
Andrew L. Moore
slewsys at gmail.com
Tue Jun 18 14:05:15 PDT 2013
Hi,
Attempting to compile recent Emacs sources (24.3.x) against recent MacPorts libraries (glib2 @2.36.3_0, et al) fails when bootstrap-emacs is first invoked: a segmentation fault occurs in g_source_unref. I'm curious if anyone else is seeing similar (mis)behavior with recent MacPorts glibs, or maybe I'm doing something dumb? MacPorts emacs-app (24.3) compiles successfully against current MacPorts glib, and recent Emacs sources compile successfully against Apple-distributed libraries. Furthermore, the same Emacs sources that fail now where successfully compiled against a previous version MacPorts glib (I'd have to research exactly which one).
The problem can be reproduced as follows (Emacs revision No. 112895 because this is known to have compiled successfully against previous MacPorts glibs):
$ clang --version
Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn)
Target: x86_64-apple-darwin12.4.0
Thread model: posix
$ port version
Version: 2.2.99
$ port installed glib*
The following ports are currently installed:
glib2 @2.36.3_0 (active)
$ bzr checkout --revision=revno:112895 bzr://bzr.savannah.gnu.org/emacs/trunk/ emacs-112895
(…)
$ cd emacs-112895
$ env CC=clang ./configure --with-ns --without-dbus --prefix=/opt/local
...
$ make bootstrap
(…)
Finding pointers to doc strings...
Finding pointers to doc strings...done
Dumping under the name emacs
--- List of All Regions ---
address size prot maxp
--- List of Regions to be Dumped ---
address size prot maxp
--- Header Information ---
Magic = 0xfeedfacf
CPUType = 16777223
CPUSubType = -2147483645
FileType = 0x2
NCmds = 33
SizeOfCmds = 4192
Flags = 0x00000085
Highest address of load commands in input file: 0x100640000
Lowest offset of all sections in __TEXT segment: 0x2040
--- List of Load Commands in Input File ---
# cmd cmdsize name address size
0 LC_SEGMENT_64 72 __PAGEZERO 0 0x100000000
1 LC_SEGMENT_64 952 __TEXT 0x100000000 0x1eb000
__text 0x100002040 0x1a8e08
__stubs 0x1001aae48 0x846
__stub_helper 0x1001ab690 0xdda
__const 0x1001ac470 0xf24
__cstring 0x1001ad3a0 0x142fa
__objc_methname 0x1001c169a 0x3284
__objc_classname 0x1001c491e 0x11f
__objc_methtype 0x1001c4a3d 0x1392
__gcc_except_tab 0x1001c5dd0 0x4c
__unwind_info 0x1001c5e1c 0x207c
__eh_frame 0x1001c7e98 0x23160
2 LC_SEGMENT_64 1512 __DATA 0x1001eb000 0x39c000
__got 0x1001eb000 0x1f0
__nl_symbol_ptr 0x1001eb1f0 0x10
__la_symbol_ptr 0x1001eb200 0xb08
__objc_classlist 0x1001ebd08 0x78
__objc_protolist 0x1001ebd80 0x30
__objc_imageinfo 0x1001ebdb0 0x8
__objc_const 0x1001ebdb8 0x38b8
__objc_selrefs 0x1001ef670 0xf90
__objc_msgrefs 0x1001f0600 0xd0
__objc_classrefs 0x1001f06d0 0x1f8
__objc_superrefs 0x1001f08c8 0x60
__objc_data 0x1001f0928 0x4b0
__data 0x1001f0de0 0x3172cc
__const 0x1005080b0 0x34f0
__cfstring 0x10050b5a0 0x680
__objc_ivar 0x10050bc20 0x200
__bss 0x10050be20 0x76af0
__common 0x100582910 0x41b9
3 LC_SEGMENT_64 72 __LINKEDIT 0x100587000 0xb9000
4 LC_DYLD_INFO_ONLY 48
5 LC_SYMTAB 24
6 LC_DYSYMTAB 80
7 LC_LOAD_DYLINKER 32
8 LC_UUID 24
9 LC_VERSION_MIN_MACOSX 16
10 LC_SOURCE_VERSION 16
11 LC_MAIN 24
12 LC_LOAD_DYLIB 88
13 LC_LOAD_DYLIB 88
14 LC_LOAD_DYLIB 56
15 LC_LOAD_DYLIB 56
16 LC_LOAD_DYLIB 56
17 LC_LOAD_DYLIB 64
18 LC_LOAD_DYLIB 56
19 LC_LOAD_DYLIB 56
20 LC_LOAD_DYLIB 56
21 LC_LOAD_DYLIB 56
22 LC_LOAD_DYLIB 56
23 LC_LOAD_DYLIB 56
24 LC_LOAD_DYLIB 56
25 LC_LOAD_DYLIB 104
26 LC_LOAD_DYLIB 104
27 LC_LOAD_DYLIB 112
28 LC_LOAD_DYLIB 56
29 LC_LOAD_DYLIB 96
30 LC_FUNCTION_STARTS 16
31 LC_DATA_IN_CODE 16
32 LC_DYLIB_CODE_SIGN_DRS 16
0x1038fc080 (sz: 0x3f2c/ 0x3f30)
0x103800000 (sz: 0xe0fbf/ 0xfc080)
0x1021fc080 (sz: 0x3f2c/ 0x3f30)
0x102100000 (sz: 0xdad3f/ 0xfc080)
0x1047f8000 (sz: 0x64ce/ 0x7fa8)
0x104000000 (sz: 0x64a3ff/0x7f8000)
0x102ff8000 (sz: 0x7dfa/ 0x7fa8)
0x102800000 (sz: 0x7f7fff/0x7f8000)
0x1067f8000 (sz: 0x3c6/ 0x7fa8)
0x106000000 (sz: 0x397fd/0x7f8000)
0x1014d0000 (sz: 0xf5d/ 0x1000)
--- Load Commands written to Output File ---
Writing segment __PAGEZERO @ 0 ( 0/0x100000000 @ 0)
Writing segment __TEXT @ 0 (0x1eb000/0x1eb000 @ 0x100000000)
Writing segment __DATA @ 0x1eb000 (0x39c000/0x39c000 @ 0x1001eb000)
section __got at 0x1eb000 - 0x1eb1f0 (sz: 0x1f0)
section __nl_symbol_ptr at 0x1eb1f0 - 0x1eb200 (sz: 0x10)
section __la_symbol_ptr at 0x1eb200 - 0x1ebd08 (sz: 0xb08)
section __objc_classlist at 0x1ebd08 - 0x1ebd80 (sz: 0x78)
section __objc_protolist at 0x1ebd80 - 0x1ebdb0 (sz: 0x30)
section __objc_imageinfo at 0x1ebdb0 - 0x1ebdb8 (sz: 0x8)
section __objc_const at 0x1ebdb8 - 0x1ef670 (sz: 0x38b8)
section __objc_selrefs at 0x1ef670 - 0x1f0600 (sz: 0xf90)
section __objc_msgrefs at 0x1f0600 - 0x1f06d0 (sz: 0xd0)
section __objc_classrefs at 0x1f06d0 - 0x1f08c8 (sz: 0x1f8)
section __objc_superrefs at 0x1f08c8 - 0x1f0928 (sz: 0x60)
section __objc_data at 0x1f0928 - 0x1f0dd8 (sz: 0x4b0)
section __data at 0x1f0de0 - 0x5080ac (sz: 0x3172cc)
section __const at 0x5080b0 - 0x50b5a0 (sz: 0x34f0)
section __cfstring at 0x50b5a0 - 0x50bc20 (sz: 0x680)
section __objc_ivar at 0x50bc20 - 0x50be20 (sz: 0x200)
section __bss at 0x50be20 - 0x582910 (sz: 0x76af0)
section __common at 0x582910 - 0x586ac9 (sz: 0x41b9)
Writing segment __DATA @ 0x587000 ( 0xf5d/ 0x1000 @ 0x1014d0000)
Writing segment __DATA @ 0x588000 ( 0xdad3f/ 0xfc000 @ 0x102100000)
Writing segment __DATA @ 0x663000 ( 0x3fac/ 0x3fb0 @ 0x1021fc000)
Writing segment __DATA @ 0x667000 (0x7ffdfa/0x7fffa8 @ 0x102800000)
Writing segment __DATA @ 0xe67000 ( 0xe0fbf/ 0xfc000 @ 0x103800000)
Writing segment __DATA @ 0xf48000 ( 0x3fac/ 0x3fb0 @ 0x1038fc000)
Writing segment __DATA @ 0xf4c000 (0x64a3ff/0x7f8000 @ 0x104000000)
Writing segment __DATA @ 0x1597000 ( 0x64ce/ 0x7fa8 @ 0x1047f8000)
Writing segment __DATA @ 0x159e000 ( 0x397fd/0x7f8000 @ 0x106000000)
Writing segment __DATA @ 0x15d8000 ( 0x3c6/ 0x7fa8 @ 0x1067f8000)
Writing segment __LINKEDIT @ 0x15d9000 ( 0xb8040/ 0xb9000 @ 0x100587000)
Writing LC_DYLD_INFO_ONLY command
Writing LC_SYMTAB command
Writing LC_DYSYMTAB command
Writing LC_LOAD_DYLINKER command
Writing LC_UUID command
Writing LC_VERSION_MIN_MACOSX command
Writing LC_SOURCE_VERSION command
Writing LC_MAIN command
Writing LC_LOAD_DYLIB command
Writing LC_LOAD_DYLIB command
Writing LC_LOAD_DYLIB command
Writing LC_LOAD_DYLIB command
Writing LC_LOAD_DYLIB command
Writing LC_LOAD_DYLIB command
Writing LC_LOAD_DYLIB command
Writing LC_LOAD_DYLIB command
Writing LC_LOAD_DYLIB command
Writing LC_LOAD_DYLIB command
Writing LC_LOAD_DYLIB command
Writing LC_LOAD_DYLIB command
Writing LC_LOAD_DYLIB command
Writing LC_LOAD_DYLIB command
Writing LC_LOAD_DYLIB command
Writing LC_LOAD_DYLIB command
Writing LC_LOAD_DYLIB command
Writing LC_LOAD_DYLIB command
Writing LC_FUNCTION_STARTS command
Writing LC_DATA_IN_CODE command
Writing LC_DYLIB_CODE_SIGN_DRS command
3312 unused bytes follow Mach-O header
84394 pure bytes used
cd ../lisp; make compile-first EMACS=/opt/src/emacs/emacs-112895/src/bootstrap-emacs
Compiling /opt/src/emacs/emacs-112895/lisp/emacs-lisp/macroexp.el
Fatal error 11: Segmentation faultmake[3]: *** [/opt/src/emacs/emacs-112895/lisp/emacs-lisp/macroexp.elc] Abort trap: 6
make[2]: *** [bootstrap-emacs] Error 2
make[1]: *** [src] Error 2
make: *** [bootstrap] Error 2
$ gdb src/bootstrap-emacs
GNU gdb 6.3.50-20050815 (Apple version gdb-1824) (Wed Feb 6 22:51:23 UTC 2013)
(…)
(gdb) run
(…)
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000001522610
0x00000001008866b0 in g_source_unref ()
(gdb) bt
#0 0x00000001008866b0 in g_source_unref ()
#1 0x0000000100154f66 in init_process_emacs () at process.c:7073
#2 0x000000010009e6dd in main (argc=Cannot access memory at address 0x0) at emacs.c:1464
(gdb)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4133 bytes
Desc: not available
URL: <http://lists.macosforge.org/pipermail/macports-dev/attachments/20130618/148404f5/attachment.p7s>
More information about the macports-dev
mailing list