SIGSEGV in PB 5.73 compiler on MacOS BigSur

Post bugreports for the Mac OSX version here
User avatar
Kukulkan
Addict
Addict
Posts: 1261
Joined: Mon Jun 06, 2005 2:35 pm
Location: germany
Contact:

SIGSEGV in PB 5.73 compiler on MacOS BigSur

Post by Kukulkan »

Hi,

I recently got this SegFault error on my MacMini with BigSur.

The most important part is, IMHO, the following line:

Code: Select all

0   libdyld.dylib                 	0x00007fff20525cbe stack_not_16_byte_aligned_error + 0
Here is the full trace:

Code: Select all

Process:               PureBasic [29624]
Path:                  /Applications/purebasic-5.73-x64.app/Contents/MacOS/PureBasic
Identifier:            com.fantaisiesoftware.purebasicide
Version:               0.1
Code Type:             X86-64 (Native)
Parent Process:        ??? [1]
Responsible:           PureBasic [29624]
User ID:               502

Date/Time:             2021-06-09 10:55:57.660 +0200
OS Version:            macOS 11.4 (20F71)
Report Version:        12
Anonymous UUID:        0F6D00D5-0B92-F9A8-19A1-871F822802D3


Time Awake Since Boot: 150000 seconds

System Integrity Protection: enabled

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       EXC_I386_GPFLT
Exception Note:        EXC_CORPSE_NOTIFY

Termination Signal:    Segmentation fault: 11
Termination Reason:    Namespace SIGNAL, Code 0xb
Terminating Process:   exc handler [29624]

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libdyld.dylib                 	0x00007fff20525cbe stack_not_16_byte_aligned_error + 0
1   ???                           	0x00007ffeefbfddf8 0 + 140732920749560
2   com.fantaisiesoftware.purebasicide	0x000000010000e61c 0x100000000 + 58908
3   com.fantaisiesoftware.purebasicide	0x0000000100212091 0x100000000 + 2171025
4   com.fantaisiesoftware.purebasicide	0x000000010006a1a5 0x100000000 + 434597
5   com.apple.AppKit              	0x00007fff22fc32f5 -[NSSplitView resetCursorRects] + 100
6   com.apple.AppKit              	0x00007fff236a0409 -[NSView _updateTrackingAreasWithInvalidCursorRects:] + 691
7   com.apple.AppKit              	0x00007fff236a0a04 -[NSView _updateTrackingAreasWithInvalidCursorRects:] + 2222
8   com.apple.AppKit              	0x00007fff236a0a04 -[NSView _updateTrackingAreasWithInvalidCursorRects:] + 2222
9   com.apple.AppKit              	0x00007fff22ee3ae5 _NSWindowDisplayCycleUpdateStructuralRegions + 212
10  com.apple.AppKit              	0x00007fff22ede95f __NSWindowGetDisplayCycleObserverForUpdateStructuralRegions_block_invoke + 420
11  com.apple.AppKit              	0x00007fff22ed81e5 NSDisplayCycleObserverInvoke + 155
12  com.apple.AppKit              	0x00007fff22ed7d70 NSDisplayCycleFlush + 953
13  com.apple.QuartzCore          	0x00007fff26d691f6 CA::Transaction::run_commit_handlers(CATransactionPhase) + 92
14  com.apple.QuartzCore          	0x00007fff26d67f8d CA::Transaction::commit() + 375
15  com.apple.AppKit              	0x00007fff22e57f5c -[NSWindow _setFrameCommon:display:fromServer:] + 3985
16  com.apple.AppKit              	0x00007fff22f2f747 -[NSWindow setFrameOrigin:] + 382
17  com.apple.AppKit              	0x00007fff23089409 -[NSWindow center] + 303
18  com.fantaisiesoftware.purebasicide	0x0000000100265d9a 0x100000000 + 2514330
19  com.fantaisiesoftware.purebasicide	0x00000001002669d9 0x100000000 + 2517465
20  com.fantaisiesoftware.purebasicide	0x00000001000c58af 0x100000000 + 809135

Thread 1:
0   libsystem_kernel.dylib        	0x00007fff204d8bb2 __semwait_signal + 10
1   libsystem_c.dylib             	0x00007fff20458c2a nanosleep + 196
2   com.fantaisiesoftware.purebasicide	0x000000010028a237 0x100000000 + 2662967
3   com.fantaisiesoftware.purebasicide	0x00000001000f9cb3 0x100000000 + 1023155

Thread 2:
0   libsystem_kernel.dylib        	0x00007fff204dba8a __wait4 + 10
1   com.fantaisiesoftware.purebasicide	0x000000010023681c 0x100000000 + 2320412
2   libsystem_pthread.dylib       	0x00007fff2050b8fc _pthread_start + 224
3   libsystem_pthread.dylib       	0x00007fff20507443 thread_start + 15

Thread 3:: com.apple.NSEventThread
0   libsystem_kernel.dylib        	0x00007fff204d62ba mach_msg_trap + 10
1   libsystem_kernel.dylib        	0x00007fff204d662c mach_msg + 60
2   com.apple.CoreFoundation      	0x00007fff20604b5f __CFRunLoopServiceMachPort + 316
3   com.apple.CoreFoundation      	0x00007fff2060323f __CFRunLoopRun + 1328
4   com.apple.CoreFoundation      	0x00007fff2060264c CFRunLoopRunSpecific + 563
5   com.apple.AppKit              	0x00007fff22f8968a _NSEventThread + 124
6   libsystem_pthread.dylib       	0x00007fff2050b8fc _pthread_start + 224
7   libsystem_pthread.dylib       	0x00007fff20507443 thread_start + 15

Thread 4:
0   libsystem_kernel.dylib        	0x00007fff204d8cde __psynch_cvwait + 10
1   libsystem_pthread.dylib       	0x00007fff2050be49 _pthread_cond_wait + 1298
2   com.fantaisiesoftware.purebasicide	0x000000010020829b 0x100000000 + 2130587
3   com.fantaisiesoftware.purebasicide	0x00000001001d6a2a 0x100000000 + 1927722

Thread 5:
0   libsystem_kernel.dylib        	0x00007fff204d8bb2 __semwait_signal + 10
1   libsystem_c.dylib             	0x00007fff20458c2a nanosleep + 196
2   com.fantaisiesoftware.purebasicide	0x000000010028a237 0x100000000 + 2662967
3   com.fantaisiesoftware.purebasicide	0x00000001001906cf 0x100000000 + 1640143

Thread 6:
0   libsystem_pthread.dylib       	0x00007fff20507420 start_wqthread + 0

Thread 7:
0   libsystem_pthread.dylib       	0x00007fff20507420 start_wqthread + 0

Thread 8:
0   libsystem_pthread.dylib       	0x00007fff20507420 start_wqthread + 0

Thread 9:
0   libsystem_pthread.dylib       	0x00007fff20507420 start_wqthread + 0

Thread 10:
0   libsystem_pthread.dylib       	0x00007fff20507420 start_wqthread + 0

Thread 11:
0   libsystem_pthread.dylib       	0x00007fff20507420 start_wqthread + 0

Thread 12:
0   libsystem_pthread.dylib       	0x00007fff20507420 start_wqthread + 0

Thread 0 crashed with X86 Thread State (64-bit):
  rax: 0x0000000000000000  rbx: 0x00007fff203a9800  rcx: 0x0000000000000000  rdx: 0x0000000100659bd0
  rdi: 0x0000000000000000  rsi: 0x0000000000000000  rbp: 0x00007ffeefbfddf8  rsp: 0x00007ffeefbfddd8
   r8: 0x0000600002c10260   r9: 0x0000000000000000  r10: 0x00000000ffffff00  r11: 0x00000001005ae030
  r12: 0x00000001007337d0  r13: 0x00007fff203a9800  r14: 0x000000010072ceb0  r15: 0x000060000028dfe0
  rip: 0x00007fff20525cbe  rfl: 0x0000000000010202  cr2: 0x0000000107596c00
  
Logical CPU:     0
Error Code:      0x00000000
Trap Number:     13

Thread 0 instruction stream:
  0f 6f 54 24 20 66 0f 6f-5c 24 30 66 0f 6f 64 24  .oT$ f.o\$0f.od$
  40 66 0f 6f 6c 24 50 66-0f 6f 74 24 60 66 0f 6f  @f.ol$Pf.ot$`f.o
  7c 24 70 eb 10 8b 05 db-e0 31 60 8b 15 d9 e0 31  |$p......1`....1
  60 0f ae 2c 24 48 8b 7d-f8 48 8b 75 f0 48 8b 55  `..,$H.}.H.u.H.U
  e8 48 8b 4d e0 48 8b 5d-d8 48 8b 45 d0 4c 8b 45  .H.M.H.].H.E.L.E
  c8 4c 8b 4d c0 48 89 ec-5d 48 83 c4 10 41 ff e3  .L.M.H..]H...A..
 [66]0f 7f 04 24 cc 90 90-90 55 48 89 e5 41 57 41  f...$....UH..AWA	<==
  56 53 50 49 89 f6 48 89-fb 48 8b 0d 3a e3 31 60  VSPI..H..H..:.1`
  48 85 c9 75 1d 48 8d 3d-3e f5 01 00 4c 8d 7d e0  H..u.H.=>...L.}.
  4c 89 fe e8 21 fd ff ff-49 8b 0f 48 89 0d 18 e3  L...!...I..H....
  31 60 48 89 df 4c 89 f6-ff d1 48 83 c4 08 5b 41  1`H..L....H...[A
  5e 41 5f 5d c3 90 90 55-48 89 e5 80 3d 30 e3 31  ^A_]...UH...=0.1
  
Thread 0 last branch register state not available.
User avatar
mk-soft
Addict
Addict
Posts: 3069
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: SIGSEGV in PB 5.73 compiler on MacOS BigSur

Post by mk-soft »

It could be a problem of dylib, and not of PB. Show google.

Some more code to test would be helpful
My Projects ThreadToGUI / OOP-BaseClass / OOP-BaseClassDispatch / EventDesigner V3
PB v3.30 / v5.70 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace
User avatar
Kukulkan
Addict
Addict
Posts: 1261
Joined: Mon Jun 06, 2005 2:35 pm
Location: germany
Contact:

Re: SIGSEGV in PB 5.73 compiler on MacOS BigSur

Post by Kukulkan »

I do not have test code because it is a very big project and it does not happen all the time. It also looks like it is gone after I switched back to PB 5.71. But not sure, maybe it pops up again. Due to the error report, it was caused by the purebasic compiler executable. But I also found many google hits for that error in several environments, but mostly clang based. Maybe it is a clang issue?

I will continue to have a look and if it comes back, maybe with more evidence, I will report here.
Fred
Administrator
Administrator
Posts: 14294
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: SIGSEGV in PB 5.73 compiler on MacOS BigSur

Post by Fred »

Alignement stack issue can be a bug in the asm compiler for OS X as it enforce this much more than Linux or Windows. If you can isolate the issue, I will take a closer look.
Post Reply