While running the tests (squeak 4.6) on macos32x86, the failure materializes in console with repeated:
> select: Invalid argument
> errno 22
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/436
Branch: refs/heads/compile_linux64x64_with_clang
Home: https://github.com/OpenSmalltalk/opensmalltalk-vm
Commit: 219a1dc34c3b51265ec3df2809f99da425112bbd
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/219a1dc34c3b51265e…
Author: Nicolas Cellier <nicolas.cellier.aka.nice(a)gmail.com>
Date: 2019-10-28 (Mon, 28 Oct 2019)
Changed paths:
M build.linux64x64/newspeak.stack.spur/build.assert/mvm
M build.linux64x64/newspeak.stack.spur/build.debug/mvm
M build.linux64x64/newspeak.stack.spur/build/mvm
M build.linux64x64/nsnac.cog.spur/build.assert.itimerheartbeat/mvm
M build.linux64x64/nsnac.cog.spur/build.assert/mvm
M build.linux64x64/nsnac.cog.spur/build.debug.itimerheartbeat/mvm
M build.linux64x64/nsnac.cog.spur/build.debug/mvm
M build.linux64x64/nsnac.cog.spur/build.itimerheartbeat/mvm
M build.linux64x64/nsnac.cog.spur/build/mvm
M build.linux64x64/pharo.cog.spur.minheadless/build.assert/mvm
M build.linux64x64/pharo.cog.spur.minheadless/build.debug/mvm
M build.linux64x64/pharo.cog.spur.minheadless/build/mvm
M build.linux64x64/pharo.cog.spur/build.assert.itimerheartbeat/mvm
M build.linux64x64/pharo.cog.spur/build.assert/mvm
M build.linux64x64/pharo.cog.spur/build.debug.itimerheartbeat/mvm
M build.linux64x64/pharo.cog.spur/build.debug/mvm
M build.linux64x64/pharo.cog.spur/build.itimerheartbeat/mvm
M build.linux64x64/pharo.cog.spur/build/mvm
M build.linux64x64/squeak.cog.spur.immutability/build.assert/mvm
M build.linux64x64/squeak.cog.spur.immutability/build.debug/mvm
M build.linux64x64/squeak.cog.spur.immutability/build/mvm
M build.linux64x64/squeak.cog.spur/build.assert.itimerheartbeat/mvm
M build.linux64x64/squeak.cog.spur/build.assert/mvm
M build.linux64x64/squeak.cog.spur/build.debug.itimerheartbeat/mvm
M build.linux64x64/squeak.cog.spur/build.debug/mvm
M build.linux64x64/squeak.cog.spur/build.itimerheartbeat/mvm
M build.linux64x64/squeak.cog.spur/build/mvm
M build.linux64x64/squeak.stack.spur/build.assert/mvm
M build.linux64x64/squeak.stack.spur/build.debug/mvm
M build.linux64x64/squeak.stack.spur/build/mvm
Log Message:
-----------
Compile all linux64x64 with clang
reason: gcc currently has incompatible stack management with recent cog changes in SP/FP handling
Commit: 28466a92999e5834fe8bf525226f66aac1ee7e55
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/28466a92999e5834fe…
Author: Nicolas Cellier <nicolas.cellier.aka.nice(a)gmail.com>
Date: 2019-10-28 (Mon, 28 Oct 2019)
Changed paths:
M build.linux64x64/newspeak.stack.spur/build/mvm
M build.linux64x64/nsnac.cog.spur/build.itimerheartbeat/mvm
M build.linux64x64/nsnac.cog.spur/build/mvm
M build.linux64x64/pharo.cog.spur/build.itimerheartbeat/mvm
M build.linux64x64/pharo.cog.spur/build/mvm
M build.linux64x64/squeak.cog.spur.immutability/build/mvm
M build.linux64x64/squeak.cog.spur/build.itimerheartbeat/mvm
M build.linux64x64/squeak.cog.spur/build/mvm
Log Message:
-----------
Remove obsolete gcc 3.4 specific options
YAGNI
Now that we removed most UB (all ?), this might not even be necessary, but we ain't gonna check such legacy stuff.
Commit: f8a20f758afe5824c2aac0884ca3950b45dec006
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/f8a20f758afe5824c2…
Author: Nicolas Cellier <nicolas.cellier.aka.nice(a)gmail.com>
Date: 2019-10-28 (Mon, 28 Oct 2019)
Changed paths:
M build.linux64x64/newspeak.stack.spur/build.assert/mvm
M build.linux64x64/newspeak.stack.spur/build.debug/mvm
M build.linux64x64/nsnac.cog.spur/build.assert.itimerheartbeat/mvm
M build.linux64x64/nsnac.cog.spur/build.assert/mvm
M build.linux64x64/nsnac.cog.spur/build.debug.itimerheartbeat/mvm
M build.linux64x64/nsnac.cog.spur/build.debug/mvm
M build.linux64x64/pharo.cog.spur/build.assert.itimerheartbeat/mvm
M build.linux64x64/pharo.cog.spur/build.assert/mvm
M build.linux64x64/pharo.cog.spur/build.debug.itimerheartbeat/mvm
M build.linux64x64/pharo.cog.spur/build.debug/mvm
M build.linux64x64/squeak.cog.spur.immutability/build.assert/mvm
M build.linux64x64/squeak.cog.spur.immutability/build.debug/mvm
M build.linux64x64/squeak.cog.spur/build.assert.itimerheartbeat/mvm
M build.linux64x64/squeak.cog.spur/build.assert/mvm
M build.linux64x64/squeak.cog.spur/build.debug.itimerheartbeat/mvm
M build.linux64x64/squeak.cog.spur/build.debug/mvm
M build.linux64x64/squeak.stack.spur/build.assert/mvm
M build.linux64x64/squeak.stack.spur/build.debug/mvm
M build.linux64x64/squeak.stack.spur/build/mvm
Log Message:
-----------
Remove remaining -fwrapv compiler option in linux64x64
Reason: the -fwrapv flag let the compiler assume that integer overflow will wrap (modulo 2^nbits) rather than will never happen (because UB)
This flag was once necessary when we did depend on UB, but should be un-necessary now
If ever it's still the case, it's better to eliminate UB rather than try to hide/ignore it.
We shall NOT depend on UB.
Note if we suspect UB problems:
With clang we can use -fsanitize=undefined
This will instrumente code to detect UB situations, and create runtime warnings whenever UB is encountered
Commit: 8fd8a5090e8653ed957bf2e5c217f3e269f4b7d2
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/8fd8a5090e8653ed95…
Author: Nicolas Cellier <nicolas.cellier.aka.nice(a)gmail.com>
Date: 2019-10-28 (Mon, 28 Oct 2019)
Changed paths:
M build.linux64x64/pharo.cog.spur.minheadless/build.assert.itimerheartbeat/mvm
M build.linux64x64/pharo.cog.spur.minheadless/build.debug.itimerheartbeat/mvm
M build.linux64x64/pharo.cog.spur.minheadless/build.itimerheartbeat/mvm
Log Message:
-----------
Fix 3 minheadless flavours trying to compile for i386 target
This ain't the right place, we are in linux64x64 here (x86_64 architecture).
Are these scripts obsolete?
Don't we build minheadless with cmake?
Compare: https://github.com/OpenSmalltalk/opensmalltalk-vm/compare/219a1dc34c3b%5E..…
Branch: refs/heads/Cog
Home: https://github.com/OpenSmalltalk/opensmalltalk-vm
Commit: a2f6e9ebafc33c5a7ce56a236b8d8d00613541e6
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/a2f6e9ebafc33c5a7c…
Author: Nicolas Cellier <nicolas.cellier.aka.nice(a)gmail.com>
Date: 2019-10-28 (Mon, 28 Oct 2019)
Changed paths:
M src/vm/cointerp.c
M src/vm/cointerp.h
M src/vm/cointerpmt.c
M src/vm/cointerpmt.h
M src/vm/gcc3x-cointerp.c
M src/vm/gcc3x-cointerpmt.c
M stacksrc/vm/gcc3x-interp.c
M stacksrc/vm/interp.c
M stacksrc/vm/interp.h
Log Message:
-----------
Fix issue 436 again
Perform C integer arithmetic with the right int type (64 bits signed sqLong rather than 32bits unsigned usqInt).
Nicolas Cellier uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-nice.2574.mcz
==================== Summary ====================
Name: VMMaker.oscog-nice.2574
Author: nice
Time: 28 October 2019, 7:13:28.153845 pm
UUID: 97ff56d4-01fb-422a-8b6c-edaa2d57bbde
Ancestors: VMMaker.oscog-nice.2573
Fix issue 436 again
if msecs is usqInt, then the subtraction msecs - ioMsecs() is performed as unsigned 32bits, and can lead to high value instead of slightly negative value, which remain positive when converted to 64 bit signed long deltaMsecs...
That makes a near 48 days delay before waking up!
The expression must be evaluated with 64bits signed long arithmetic, what we obtain by declaring msecs as sqLong...
When we write C code, we must think in C language, not upper level language with exact integer arithmetic (no wrap, no overflow), that's a potential danger of Slang...
=============== Diff against VMMaker.oscog-nice.2573 ===============
Item was changed:
----- Method: StackInterpreterPrimitives>>primitiveSignalAtMilliseconds (in category 'system control primitives') -----
primitiveSignalAtMilliseconds
"Cause the time semaphore, if one has been registered, to be
signalled when the microsecond clock is greater than or equal to
the given tick value. A tick value of zero turns off timer interrupts."
| msecsObj msecs deltaMsecs sema limit |
+ <var: #msecs type: #sqLong>
- <var: #msecs type: #usqInt>
<var: #deltaMsecs type: #sqLong>
<var: #limit type: #sqLong>
msecsObj := self stackTop.
sema := self stackValue: 1.
msecs := self positive32BitValueOf: msecsObj.
self successful ifTrue:
[(objectMemory isSemaphoreOop: sema) ifTrue:
[objectMemory splObj: TheTimerSemaphore put: sema.
deltaMsecs := msecs - (self ioMSecs bitAnd: MillisecondClockMask).
limit := MillisecondClockMask >> 1.
"Handle a roll-over that could happen in between image invocation of ioMSecs and this invocation.
This will limit the maximum relative duration to MillisecondClockMask/2, about 3 days currently.
Every delay longer than that limit may lead to undefined behavior (shorten delay, or no delay at all)"
deltaMsecs > limit ifTrue: [deltaMsecs := deltaMsecs - MillisecondClockMask].
nextWakeupUsecs := deltaMsecs > 0
ifTrue: [self ioUTCMicroseconds + (deltaMsecs * 1000)]
ifFalse: [self ioUTCMicroseconds].
^self pop: 2].
sema = objectMemory nilObject ifTrue:
[objectMemory
storePointer: TheTimerSemaphore
ofObject: objectMemory specialObjectsOop
withValue: objectMemory nilObject.
nextWakeupUsecs := 0.
^self pop: 2]].
self primitiveFailFor: PrimErrBadArgument!
Branch: refs/heads/fix_issue_436
Home: https://github.com/OpenSmalltalk/opensmalltalk-vm
Commit: b80dd63c2aa1517b186099b9669a89e4385772cb
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/b80dd63c2aa1517b18…
Author: nicolas.cellier.aka.nice(a)gmail.com <nicolas.cellier.aka.nice(a)gmail.com>
Date: 2019-10-26 (Sat, 26 Oct 2019)
Changed paths:
M platforms/minheadless/unix/sqUnixHeartbeat.c
M platforms/unix/misc/threadValidate/sqUnixHeartbeat.c
M platforms/unix/vm/sqUnixHeartbeat.c
M platforms/unix/vm/sqUnixITimerHeartbeat.c
M platforms/unix/vm/sqUnixITimerTickerHeartbeat.c
Log Message:
-----------
Avoid an overflow in ioRelinquishProcessorForMicroseconds
Commit: 588a4ca2b2e7eafe87ff5b0643c8bc0c09787e1e
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/588a4ca2b2e7eafe87…
Author: nicolas.cellier.aka.nice(a)gmail.com <nicolas.cellier.aka.nice(a)gmail.com>
Date: 2019-10-26 (Sat, 26 Oct 2019)
Changed paths:
M platforms/Mac OS/vm/sqMacTime.c
M platforms/iOS/vm/Common/Classes/sqMacV2Time.c
M platforms/iOS/vm/Common/sqDummyaio.h
M platforms/iOS/vm/iPhone/sqDummyaio.c
M platforms/unix/misc/threadValidate/sqUnixHeartbeat.c
M platforms/unix/vm-display-Quartz/zzz/sqUnixQuartz.m
M platforms/unix/vm/sqUnixITimerHeartbeat.c
M platforms/unix/vm/sqUnixITimerTickerHeartbeat.c
Log Message:
-----------
Align iOS and obsolete Mac OS
- no need for aioSleep + aioSleepForUsecs that do the same thing
keep only aioSleepForUsecs like other platforms
- replace getNextWakeupTick (obsolete) with getNextWakeupUsecs
- align the prototype of aioSleepForUsecs on other platforms (long)
- align the prototype of ioRelinquishProcessorForMicroseconds (sqInt)
Note: I do not know why microSeconds argument to ioRelinquishProcessorForMicroseconds is ignored in iPhone
It is replaced by hardcoded 16ms
Commit: 01b7df8d3afd347d7e5b9a3606362cc5c1fa1773
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/01b7df8d3afd347d7e…
Author: nicolas.cellier.aka.nice(a)gmail.com <nicolas.cellier.aka.nice(a)gmail.com>
Date: 2019-10-26 (Sat, 26 Oct 2019)
Changed paths:
M src/vm/cointerp.c
M src/vm/cointerp.h
M src/vm/cointerpmt.c
M src/vm/cointerpmt.h
M src/vm/gcc3x-cointerp.c
M src/vm/gcc3x-cointerpmt.c
M stacksrc/vm/gcc3x-interp.c
M stacksrc/vm/interp.c
Log Message:
-----------
Fix primitiveSignalAtMilliseconds for the cog.v3 flavours
We could also fix it for the spur variants, but this can wait because those primitive are presumably unused (superseded by microsecond handling)
Compare: https://github.com/OpenSmalltalk/opensmalltalk-vm/compare/b80dd63c2aa1%5E..…