Opened 14 months ago

Last modified 11 months ago

#68323 new defect

gdb @13.1+multiarch: crash when LC_MESSAGES is undefined

Reported by: tcwan (TC Wan) Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.8.1
Keywords: sonoma Cc: tifrueh (Timo Früh)
Port: gdb

Description

This was caused by gdb 13.1 +multiarch installed on macOS Sonoma running on MacBook Air (Apple Silicon), but I have seen similar error reports due to stringByStandardizingPath.

The workaround is to define LC_MESSAGES, but I believe it should be done centrally since it would affect multiple ports?

% ggdb
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString stringByStandardizingPath]: unrecognized selector sent to instance 0x600000770300'
*** First throw call stack:
(
0 CoreFoundation __exceptionPreprocess + 242
1 libobjc.A.dylib
0x00007ff806106b5e 0x00007ff805bfc5ff objc_exception_throw +
48
[NSObject(NSObject) __retain_OA] + 0
2 CoreFoundation 3 CoreFoundation 4 CoreFoundation
_CF_forwarding_prep_0 + 120 5 Foundation
arguments] + 203
6 CoreFoundation
0x00007ff8061abb6d - 0x00007ff806074f58 ___forwarding___ + 0x00007ff806074968
0x00007ff806f3711f -[NSProcessInfo
1379
0x00007ff806179662 __getDefaultArguments_block_invoke + 101
7 libdispatch.dylib _dispatch_client_callout + 8
8 libdispatch.dylib _dispatch_once_callout + 20 9 CoreFoundation
0x00007ff805e1159a 0x00007ff805e127cb
0x00007ff806179073 _addBackstopValuesForIdentifierAndSource + 626
10 CoreFoundation 0x00007ff806040f64 __81- [_CFXPreferences(SourceAdditions) withNamedVolatileSourceForIdentifier:perform:]_block_invoke + 151
11 CoreFoundation 0x00007ff806178d3c -[_CFXPreferences withNamedVolatileSourceForIdentifier:perform:] + 241
12 CoreFoundation 0x00007ff806047ba0 - [CFPrefsSearchListSource addNamedVolatileSourceForIdentifier:] + 98
13 CoreFoundation 0x00007ff8061b3609 __108- [_CFXPreferences(SearchListAdditions) withSearchListForIdentifier:container:cloudConfigurationURL:perform:]_block_i nvoke.160 + 310
14 CoreFoundation 0x00007ff8061b32d6 -[_CFXPreferences withSearchLists:] + 60
15 CoreFoundation 0x00007ff806042586 __108- [_CFXPreferences(SearchListAdditions)
 withSearchListForIdentifier:container:cloudConfigurationURL:perform:]_block_i nvoke + 278
16 CoreFoundation 0x00007ff8061b344e -[_CFXPreferences withSearchListForIdentifier:container:cloudConfigurationURL:perform:] + 349
17 CoreFoundation 0x00007ff80604200b -[_CFXPreferences copyAppValueForKey:identifier:container:configurationURL:] + 124
18 CoreFoundation 0x00007ff806041f55 _CFPreferencesCopyAppValueWithContainerAndConfiguration + 101
19 libintl.8.dylib _nl_locale_name_default + 66
20 libintl.8.dylib 1886
0x000000010e449e83 0x000000010e447f7a libintl_dcigettext +
21 ggdb _GLOBAL__sub_I_valprint.c + 912
22 dyld 0x0000000204af3f16 ___ZZNK5dyld46Loader25findAndRunAllInitializersERNS_12RuntimeStateEENK 3$_0clEv_block_invoke + 182
23 dyld 0x0000000204b3571f ___ZNK5dyld313MachOAnalyzer18forEachInitializerER11DiagnosticsRKNS0_15 VMAddrConverterEU13block_pointerFvjEPKv_block_invoke.180 + 241
24 dyld 0x0000000204b29913 ___ZNK5dyld39MachOFile14forEachSectionEU13block_pointerFvRKNS0_11Sec tionInfoEbRbE_block_invoke + 543
25 dyld 0x0000000204ad707f _ZNK5dyld39MachOFile18forEachLoadCommandER11DiagnosticsU13block_poi nterFvPK12load_commandRbE + 249
26 dyld 0x0000000204b28adc _ZNK5dyld39MachOFile14forEachSectionEU13block_pointerFvRKNS0_11Sectio nInfoEbRbE + 176
27 dyld 0x0000000204b3530a _ZNK5dyld313MachOAnalyzer18forEachInitializerER11DiagnosticsRKNS0_15VM AddrConverterEU13block_pointerFvjEPKv + 470
28 dyld 0x0000000204af0c48 _ZNK5dyld46Loader25findAndRunAllInitializersERNS_12RuntimeStateE + 222
29 dyld 0x0000000204af66ab _ZNK5dyld416JustInTimeLoader15runInitializersERNS_12RuntimeStateE + 21
30 dyld 0x0000000204af0e3d _ZNK5dyld46Loader23runInitializersBottomUpERNS_12RuntimeStateERN5dyld 35ArrayIPKS0_EE + 181
31 dyld 0x0000000204af3f8c _ZZNK5dyld46Loader38runInitializersBottomUpPlusUpwardLinksERNS_12Runti meStateEENK3$_1clEv + 98
32 dyld 0x0000000204af0ed3 _ZNK5dyld46Loader38runInitializersBottomUpPlusUpwardLinksERNS_12Runti meStateE + 93
33 dyld 0x0000000204b129ed _ZN5dyld44APIs25runAllInitializersForMainEv + 317
0x0000000103226516

34 dyld 0x0000000204adc261 _ZN5dyld4L7prepareERNS_4APIsEPKN5dyld313MachOAnalyzerE + 3397
35 dyld 0x0000000204adb33f start + 1839 )
libc++abi: terminating due to uncaught exception of type NSException zsh: abort ggdb

Change History (6)

comment:1 Changed 14 months ago by ryandesign (Ryan Carsten Schmidt)

Keywords: stringByStandardizingPath removed
Summary: Sonoma: Undefined LC_MESSAGES causes crashgdb @13.1+multiarch: crash when LC_MESSAGES is undefined

You're saying that running ggdb outside of MacPorts crashes unless LC_MESSAGES is set? MacPorts doesn't set environment variables that affect things outside of MacPorts but you can edit your shell startup file to do that if you want.

However, the issue you linked said the fix is to add -framework CoreServices when linking whatever program it is. This was also the fix we had to apply to curl; see #67953.

comment:2 Changed 14 months ago by tcwan (TC Wan)

@ryandesign I don't know for which port / library the fix should be applied to address this properly.

Of course, a solution which does not require defining environment variables would be best, since that is difficult to enforce as a requirement.

comment:3 Changed 14 months ago by ryandesign (Ryan Carsten Schmidt)

Well, based on your report, apparently the gdb port or one of its dependencies needs this fix, but all software that links with CoreFoundation apparently as of macOS 14 now needs to link with CoreServices as well to avoid this problem so this probably affects many ports.

comment:4 Changed 13 months ago by tifrueh (Timo Früh)

The aria2 issue you linked to is closed by now and it seems the problem was was solved by using the newest version of gettext, which is not yet available here on MacPorts. We're still on 0.21.1, I believe, while the latest release is 0.22.3. Might this be part of the issue?

comment:5 Changed 13 months ago by tifrueh (Timo Früh)

Cc: tifrueh added

comment:6 Changed 11 months ago by bictorv (Björn Victor)

(This is still a problem.)

Note: See TracTickets for help on using tickets.