libera/#commonlisp - IRC Chatlog
Search
1:46:36
hayley
(setf (aref "blab" 2) #\u) is undefined behaviour. After SAVE-LISP-AND-DIE, SBCL 2.2.7 would put that string in read-only memory, so trying to write to the string would cause a memory fault.
1:47:02
hayley
But I don't think that's the issue; the use of (safety 0) in that function causing a memory fault is more concerning to me now.
3:17:56
aeth
easy bonus points to score: submit PRs to remove all (safety 0) except when the (safety 0) actually has a purpose (basically, to remove bounds checks) and even then you can probably move it to a tightly bound LOCALLY (instead of the typical function scope) to limit the chance of bugs surfacing there
9:14:16
_death
atgreen: but did you run your program with the unsafety declarations removed? then it might've exposed a bug
13:37:46
atgreen
SBCL team said "that's what you get" when you use (safety 0). The cl-postgres maintainer accepted my patch.
13:43:12
aeth
Is anything other than (speed 3) ever useful to write in code? I mean, code you give other people. Because (speed 3) sometimes makes the compiler go down another path (one that perhaps might be too slow to compile with when compiling on a 386 or whatever) that generates better code in a useful way...