Memory fault when loading cl+ssl
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Fix Released
|
High
|
Douglas Katzman |
Bug Description
Hi,
I get "memory corruption" errors when I try to load the cl+ssl library under certain optimization settings, but not under other optimization settings. Trying to compile the library under (safety 3) doesn't show any obvious problems.
The attached script allows this problem to be reproduced reliably on my system. NOTE: this script deletes ~/.sbclrc. Please back it up if you care about it! Example error output from the script:
; Loading "cl+ssl"
[package alexandria.
[package babel-encodings
[package babel].
...
[package cffi-sys]
[package cffi]..
...
[package cffi-features]
[package impl-specific-
[package trivial-
[package flexi-streams]
...
...
[package bordeaux-
[package trivial-
[package cl+ssl]CORRUPTION WARNING in SBCL pid 19683(tid 46912496193760):
Memory fault at 0x1040000000 (pc=0x1001823422, sp=0x2aaab4bd6568)
The integrity of this image is possibly compromised.
Continuing with fingers crossed.
debugger invoked on a SB-SYS:
#<THREAD "main thread" RUNNING {1002A84F43}>:
Unhandled memory fault at #x1040000000.
Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.
restarts (invokable by number or by possibly-
0: [TRY-RECOMPILING ] Recompile reload and try loading it again
1: [RETRY ] Retry
2: [ACCEPT ] Continue, treating
3: Retry ASDF operation.
4: [CLEAR-
5: [ABORT ] Give up on "cl+ssl"
6: Exit debugger, returning to top level.
(SB-
$ sbcl --version
SBCL 1.3.1.181-ceaf5df
$ uname -a
Linux compute-1-3.local 2.6.32-
Changed in sbcl: | |
importance: | Undecided → High |
assignee: | nobody → Douglas Katzman (dougk) |
Changed in sbcl: | |
status: | Fix Committed → Fix Released |
I think I've tracked this down to e9046da9d3dc1be 0aa772c5e7c21b7 4d1121c350, "Remove unnecessary inline/notinline pairs for defstruct ctors."
That is, the script provokes an error on SBCL 1.3.1.108-e9046da, but doesn't provoke an error on the earlier 1.3.1.107-d503934.
It looks like that commit only changes some inlined-ness of certain functions, so it's probably not the root cause. I'm in over my head.