You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix GAP libgap segfault in function calls with >3 arguments
This fixes an inconsistent behavior where libgap function calls with more than
3 arguments would sometimes return normal GAP errors and sometimes cause
segmentation faults.
The root cause was nested GAP_Enter() calls: the main function call used
sig_GAP_Enter(), and then make_gap_list() called GAP_Enter() again, causing
race conditions in GAP's memory management.
The fix replaces GAP_CallFuncList() with GAP_CallFuncArray() and uses
C malloc/free for temporary argument arrays instead of creating GAP list
objects, eliminating the nested GAP memory management calls.
This ensures consistent error handling - invalid calls now always return
proper GAP error messages instead of sometimes segfaulting.
Fixes: Inconsistent libgap.Sum(*[1,2,3]) behavior (segfault vs GAPError)
0 commit comments