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
{{ message }}
Repository navigation
SIGSEGV at compile time: compound assignment through a property pair under a nested field of deref(p + k) #17
Compound assignment through a property pair (operator .s / operator .s:=) whose base is a nested field of deref(p + k) crashes the compiler with SIGSEGV before main runs. A plain store, a plain field, deref(p), deref(q) after var q = p + 2, and an array element all work.
daScript at c4e4906 (lookibed fork), linux x86_64, interpreter (the crash is at compile time, so every tier).
Repro (z_n.das, run with daslang z_n.das; prints nothing, exit code 139):
optionsgen2structU {
x : int
}
defoperator .s(u : U) : int {
returnu.x
}
defoperator .s:=(varu : U; v : int) {
u.x=v
}
structS {
u : U
}
vararr : S[4]
[export]
defmain {
to_log(LOG_ERROR, "start\n")
unsafe {
varp : S? =addr(arr[0])
deref(p+2).u.s+=1to_log(LOG_ERROR, "{arr[2].u.s}\n")
}
}
Forms that crash: deref(p + 2).u.s += 1, deref(p + k).u.s += 1 with k a variable, and the same through a [c_bitfields]-style generated property pair.
Found by c2das-re (a C to daslang converter): C p[2].u.s++ on a bitfield member reached through pointer arithmetic. The converter now spells the step as x = x + 1 to avoid it.
Fixed upstream: GaijinEntertainment#4449 is closed and the fix is in master abf1d40e35 (0.6.5). Verified by running this issue's repro on a build of that commit.
Activity
lookibed commentedon Nov 9, 2026
Re-checked by the owner from this issue's reproducer on daScript abf1d40 (0.6.5): fixed upstream (GaijinEntertainment/daScript 2131620 GaijinEntertainment#4472 dasLLVM, 1404d5a GaijinEntertainment#4480 optimizer, f386f92 GaijinEntertainment#4482 cache and tools). The c2das-re probes were re-pinned in the repin PRs (lookibed/c2das-re#142-GaijinEntertainment#147; ruling 38 addendum 4).
lookibed commentedon Nov 9, 2026
Fixed upstream: GaijinEntertainment#4449 is closed and the fix is in master
abf1d40e35(0.6.5). Verified by running this issue's repro on a build of that commit.