Posted by
stes on
Feb 21, 2021; 3:02pm
URL: https://forum.world.st/regression-TestObjectsAsMethods-crash-in-4-19-5-not-in-4-16-7-tp5127232.html
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
As can be seen in the screenshot at:
http://docs.openindiana.org/handbook/community/squeak/index.htmlI'm deselecting the Tests-ObjectsAsMethods test (1 test),
because it causes (reproducible) SIGSEGV on Solaris cc/OpenIndiana gcc.
I think the segmentation fault is new in recent 4.19, I think it didn't happen
a while ago in 4.16.
I can test this as follows: when I install an older version
squeak -version
4.16.7-3775
then I go into test runner: Tests-ObjectsAsMethods and select
TestObjectsAsMethods that works in 4.16.7
Test Runner
...
TestObjectsAsMethods
3 run, 3 passes, 0 expected failures, 0 failures, 0 errors, 0 unexpected passes
But it stopped working in 4.19.x which is from I believe from:
ContextInterpreter VMMaker-dtl.422 uuid: e72b95a0-204e-45a1-a4e4-3ac3c9e7a51a
the interp.c file is automatically generated from VMMaker-dtl.422.
It's reproducible in the sense that if I deselect all tests, and just select
that one single test, I can repeatedly and reproducible SIGSEGV the VM.
When I run the VM under a debugger:
dbx: warning: Bad transition in runtime linker interface. CONSISTENT->CONSISTENT
t@1 (l@1) signal SEGV (no mapping at the fault address) in interpret at line 9120 in file "interp.c"
9120 foo->freeContexts = longAt((newContext + (BASE_HEADER_SIZE)) + (0 << (SHIFT_FOR_WORD)));
(dbx) where
current thread: t@1
=>[1] interpret(), line 9120 in "interp.c"
[2] main(argc = 1, argv = 0xfeffe250, envp = 0xfeffe258), line 1484 in "sqUnixMain.c"
The above is from Solaris with cc/dbx but the same thing appears to happen
for me on OpenIndiana with gcc/gdb.
Unfortunately because the code of interp.c is automatically generated,
it looks complicated to me and I don't see what's wrong with those "
freeContext" code.
The crash appears to be in:
/* begin internalActivateNewMethod */
methodHeader = longAt((foo->newMethod + (BASE_HEADER_SIZE)) + (HeaderIndex << (SHIFT_FOR_WORD)));
needsLarge = methodHeader & LargeContextBit;
if ((needsLarge == 0) && (foo->freeContexts != NilContext)) {
newContext = foo->freeContexts;
/* begin setFreeContextsAfter: */
foo->freeContexts = longAt((newContext + (BASE_HEADER_SIZE)) + (0 << (SHIFT_FOR_WORD)));
} else {
/* begin externalizeIPandSP */
Has anyone seen this ?
Also what is the test
TestObjectsAsMethods
actually doing please ? what is it testing ?
Regards,
David Stes
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQEcBAEBCAAGBQJgMnV5AAoJEAwpOKXMq1MafEgH/3EWQxaSaVm2g4r/2p99Wc21
P+U+ijqKpVTDfJ1smwV/GsgF0V8ZrZky0k7BzRDAyq3Gi/HGVm0e2bqOAKa1fo2Y
MUS9JHOW4Lys+9qWgT0aLiWypjYlzThtYS0/Lfh013tsF1bBv2eppTceUyq/Zitv
6J0IFvDOspMN/zHwBw/ux3H6uR049boZ3mvk23sp3KIHDc2Yw2kF4TAXBwjZXmVO
UFlIAC4EAahrtNZyLZSIBDbsXOl+wJGmQTsOIBG81pfSFpP6RBrIARcu6enZC3Wc
bwsvWYADs49SKgVq3NBovfyzkZBIW30V82xlVKpOnp6A4FnOYXxQiVm9sNaOVXc=
=34TJ
-----END PGP SIGNATURE-----