Hi Holger,
Here is the result of “make check” using the same sources that I used on the Pi (2015-01-26), and running on an x86_64 version of FreeBSD. I got the same results when running “make check” on both FreeBSD 10.0 and FreeBSD 10.1 (x86_64). Interestingly, the arm install only failed one test, while the x86_64 install fails a number of them. I only need the arm install for the work I’m currently doing - the results below are provided because you asked for them. ## -------------------------------- ## ## GNU Smalltalk 3.2.91 test suite. ## ## -------------------------------- ## Regression tests. 1: arrays.st ok 2: classes.st ok 3: blocks.st ok 4: sets.st ok 5: processes.st ok 6: exceptions.st ok 7: intmath.st FAILED (testsuite.at:33) 8: floatmath.st FAILED (testsuite.at:34) 9: dates.st ok 10: objects.st ok 11: strings.st ok 12: chars.st ok 13: delays.st ok 14: geometry.st ok 15: cobjects.st ok 16: compiler.st ok 17: fileext.st ok 18: mutate.st ok 19: getopt.st ok 20: quit.st ok 21: pools.st ok 22: shape.st ok 23: streams.st ok 24: xlat.st ok Other simple tests. 25: ackermann.st ok 26: ary3.st ok 27: except.st ok 28: fibo.st ok 29: hash.st ok 30: hash2.st ok 31: heapsort.st FAILED (testsuite.at:63) 32: lists.st ok 33: lists1.st ok 34: lists2.st ok 35: matrix.st ok 36: methcall.st ok 37: nestedloop.st ok 38: objinst.st ok 39: prodcons.st ok 40: random-bench.st FAILED (testsuite.at:72) 41: sieve.st ok 42: strcat.st ok 43: stcompiler.st ok Basic packages. 44: SUnit ok 45: Parser ok ANSI compliancy tests. 46: ArrayANSITest ok 47: ArrayFactoryANSITest ok 48: BagANSITest ok 49: BagFactoryANSITest ok 50: BooleanANSITest ok 51: ByteArrayANSITest ok 52: ByteArrayFactoryANSITest ok 53: CharacterANSITest ok 54: CharacterFactoryANSITest ok 55: DateAndTimeANSITest ok 56: DateAndTimeFactoryANSITest ok 57: DictionaryANSITest ok 58: DictionaryFactoryANSITest ok 59: DurationANSITest FAILED (testsuite.at:95) 60: DurationFactoryANSITest ok 61: DyadicValuableANSITest ok 62: ErrorANSITest ok 63: ErrorClassANSITest ok 64: ExceptionANSITest ok 65: ExceptionClassANSITest ok 66: ExceptionSetANSITest ok 67: FailedMessageANSITest ok 68: FileStreamFactoryANSITest ok 69: FloatANSITest ok 70: FloatCharacterizationANSITest ok 71: FractionANSITest ok 72: FractionFactoryANSITest ok 73: IdentityDictionaryANSITest ok 74: IdentityDictionaryFactoryANSITest ok 75: IntegerANSITest ok 76: IntervalANSITest ok 77: IntervalFactoryANSITest ok 78: MessageNotUnderstoodANSITest ok 79: MessageNotUnderstoodSelectorANSITest ok 80: MonadicBlockANSITest ok 81: NilANSITest ok 82: NiladicBlockANSITest ok 83: NotificationANSITest ok 84: NotificationClassANSITest ok 85: ObjectANSITest ok 86: ObjectClassANSITest ok 87: OrderedCollectionANSITest ok 88: OrderedCollectionFactoryANSITest ok 89: ReadFileStreamANSITest ok 90: ReadStreamANSITest ok 91: ReadStreamFactoryANSITest ok 92: ReadWriteStreamANSITest ok 93: ReadWriteStreamFactoryANSITest ok 94: ScaledDecimalANSITest ok 95: SelectorANSITest ok 96: SetANSITest ok 97: SetFactoryANSITest ok 98: SortedCollectionANSITest ok 99: SortedCollectionFactoryANSITest ok 100: StringANSITest ok 101: StringFactoryANSITest ok 102: SymbolANSITest ok 103: TranscriptANSITest ok 104: WarningANSITest ok 105: WarningClassANSITest ok 106: WriteFileStreamANSITest ok 107: WriteStreamANSITest ok 108: WriteStreamFactoryANSITest ok 109: ZeroDivideANSITest ok 110: ZeroDivideFactoryANSITest ok Other packages. 111: Announcements ok 112: Complex ok 113: Continuations ok 114: DBD-MySQL skipped (testsuite.at:152) 115: DBD-PostgreSQL skipped (testsuite.at:153) 116: DBD-SQLite skipped (testsuite.at:154) 117: DebugTools ok 118: DhbNumericalMethods FAILED (testsuite.at:156) 119: Digest ok 120: GDBM skipped (testsuite.at:158) 121: Iconv ok 122: Kernel-Tests ok 123: Magritte FAILED (testsuite.at:161) 124: Netlink skipped (testsuite.at:162) 125: ROE skipped (testsuite.at:163) 126: ObjectDumper ok 127: SandstoneDb ok 128: Seaside-Core ok 129: Sockets expected failure (testsuite.at:167) 130: Sport ok 131: Swazoo ok 132: XML-XMLParser ok 133: XML-Expat skipped (testsuite.at:171) 134: ZLib ok ## ------------- ## ## Test results. ## ## ------------- ## ERROR: 127 tests were run, 8 failed (1 expected failure). 7 tests were skipped. --------------------------------------------- By the way, when running autoreconf -vi (on both arm and x86_64), I’m getting warnings that imply autoconf isn’t finding gmake. Note: gmake is GNU make, as FreeBSD has its own implementation of make. I moved /usr/bin/make out of the way, and linked /usr/bin/make to /usr/local/bin/gmake however the same warning still appears. Output of autoreconf -vi is below root@freebsdvm:/usr/local/src/smalltalk-20150126 # autoreconf -vi autoreconf-2.69: Entering directory `.' autoreconf-2.69: configure.ac: not using Gettext autoreconf-2.69: running: aclocal -I build-aux autoreconf-2.69: configure.ac: tracing autoreconf-2.69: configure.ac: adding subdirectory snprintfv to autoreconf autoreconf-2.69: Entering directory `snprintfv' autoreconf-2.69: running: aclocal -I ../build-aux autoreconf-2.69: running: libtoolize --copy autoreconf-2.69: running: /usr/local/bin/autoconf-2.69 autoreconf-2.69: running: /usr/local/bin/autoheader-2.69 autoreconf-2.69: running: automake --add-missing --copy --no-force configure.ac:348: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS') snprintfv/Makefile.am:103: warning: '%'-style pattern rules are a GNU make extension snprintfv/Makefile.am:106: warning: '%'-style pattern rules are a GNU make extension configure.ac:348: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS') autoreconf-2.69: Leaving directory `snprintfv' doc/Makefile.am:92: warning: patsubst %, %/package.xml, $(^D: non-POSIX variable name doc/Makefile.am:92: (probably a GNU make extension) doc/Makefile.am:101: warning: patsubst %, %/package.xml, $(^D: non-POSIX variable name doc/Makefile.am:101: (probably a GNU make extension) doc/Makefile.am:110: warning: patsubst %, %/package.xml, $(^D: non-POSIX variable name doc/Makefile.am:110: (probably a GNU make extension) doc/Makefile.am:119: warning: patsubst %, %/package.xml, $(^D: non-POSIX variable name doc/Makefile.am:119: (probably a GNU make extension) doc/Makefile.am:128: warning: patsubst %, %/package.xml, $(^D: non-POSIX variable name doc/Makefile.am:128: (probably a GNU make extension) doc/Makefile.am:137: warning: patsubst %, %/package.xml, $(^D: non-POSIX variable name doc/Makefile.am:137: (probably a GNU make extension) doc/Makefile.am:146: warning: patsubst %, %/package.xml, $(^D: non-POSIX variable name doc/Makefile.am:146: (probably a GNU make extension) doc/Makefile.am:162: warning: '%'-style pattern rules are a GNU make extension libgst/Makefile.am:169: warning: '%'-style pattern rules are a GNU make extension packages/gtk/Makefile.am:54: warning: '%'-style pattern rules are a GNU make extension packages/i18n/Makefile.am:18: warning: '%'-style pattern rules are a GNU make extension autoreconf-2.69: Leaving directory `.' --------------------------------------------- And these are the ports I installed on the x86_64 system (gmp is not installed) > portmaster -L ===>>> Root ports (No dependencies, not depended on) ===>>> dialog4ports-0.1.5_2 ===>>> gmake-3.82_1 ===>>> libffi-3.0.13_1 ===>>> libltdl-2.4.2_2 ===>>> libtool-2.4.2_2 ===>>> pkg-1.2.6 ===>>> pkgconf-0.9.4 ===>>> portmaster-3.17.3 ===>>> readline-6.2.5 ===>>> screen-4.0.3_14 ===>>> vim-7.4.169_1 ===>>> zip-3.0 ===>>> 12 root ports ===>>> Trunk ports (No dependencies, are depended on) ===>>> autoconf-wrapper-20131203 ===>>> automake-wrapper-20131203 ===>>> libsigsegv-2.10 ===>>> m4-1.4.17,1 ===>>> perl5-5.16.3_7 ===>>> 5 trunk ports ===>>> Branch ports (Have dependencies, are depended on) ===>>> autoconf-2.69 ===>>> 1 branch ports ===>>> Leaf ports (Have dependencies, not depended on) ===>>> automake-1.14 ===>>> bison-2.7.1,1 ===>>> gawk-4.1.0 ===>>> help2man-1.43.3_1 ===>>> 4 leaf ports ----------------------------- _______________________________________________ help-smalltalk mailing list [hidden email] https://lists.gnu.org/mailman/listinfo/help-smalltalk |
> On 04 Feb 2015, at 05:28, Stephen Woolerton <[hidden email]> wrote: > > > I got the same results when running “make check” on both FreeBSD 10.0 and FreeBSD 10.1 (x86_64). Interestingly, the arm install only failed one test, while the x86_64 install fails a number of them. I finally had the time to look into the failures. > 7: intmath.st FAILED (testsuite.at:33) > 8: floatmath.st FAILED (testsuite.at:34) Our mul_with_check doesn’t properly detect the overflow on a multiplication like (380536542838076625 * 576687883419648000) printNl. The result is negative. I don’t have a fix yet but that is easy now. We need to review the other routines with an overflow check too. We run the tests on travis-ci so I wonder how intmax_t is different between BSD and GNU. holger _______________________________________________ help-smalltalk mailing list [hidden email] https://lists.gnu.org/mailman/listinfo/help-smalltalk |
> On 16 Apr 2015, at 01:14, Holger Freyther <[hidden email]> wrote: > Our mul_with_check doesn’t properly detect the overflow on a multiplication > like (380536542838076625 * 576687883419648000) printNl. The result is > negative. I don’t have a fix yet but that is easy now. We need to review the > other routines with an overflow check too. We run the tests on travis-ci so > I wonder how intmax_t is different between BSD and GNU. the compiler optimizes the overflow check away. Shall we move to use a routine like __builtin_mul_overflow (if it is available)? The below is taken from GNU Smalltalk to see what is happening. With clang from apple (Apple LLVM version 6.1.0 (clang-602.0.49) (based on LLVM 3.6.0svn)) generates different output depending on -O0 vs. -O3. result / b == a seems to be considered always true by the compiler. I don’t know the C specification but I assume that “a * b” is assumed to never overflow so that the result of “a * b / b” is certainly “a”. #include <stdint.h> #include <stdio.h> #define PTR void* #define ST_INT_SIZE ((sizeof (PTR) * 8) - 2) #define MAX_ST_INT ((1L << ST_INT_SIZE) - 1) #define MIN_ST_INT ( ~MAX_ST_INT) #define INT_OVERFLOW(i) (((i) ^ ((i) << 1)) < 0) intptr_t mul_with_check(intptr_t a, intptr_t b, int *overflow) { intmax_t result = (intmax_t)a * b; *overflow = 0; /* We define the largest int type in stdintx.h, but we can only use it if it is two times the width of an intptr_t. */ if (sizeof (intmax_t) >= 2 * sizeof (intptr_t)) { if (result > MAX_ST_INT || result < MIN_ST_INT) *overflow = 1; else return (intptr_t) (result); } /* This fallback method uses a division to do overflow check */ else { if ((((uintptr_t) (a | b)) < (1L << (ST_INT_SIZE / 2)) || b == 0 || result / b == a) && !INT_OVERFLOW (result)) return (result); else *overflow = 1; } return (0); } int main(int argc, char **argv) { int overflow; mul_with_check(380536542838076625, 576687883419648000, &overflow); printf("overflow.. %d\n", overflow); } _______________________________________________ help-smalltalk mailing list [hidden email] https://lists.gnu.org/mailman/listinfo/help-smalltalk |
Holger Freyther <holger <at> freyther.de> writes:
> > > > On 16 Apr 2015, at 01:14, Holger Freyther <holger <at> freyther.de> wrote: > > > Our mul_with_check doesn’t properly detect the overflow on a multiplication > > like (380536542838076625 * 576687883419648000) printNl. The result is > > negative. I don’t have a fix yet but that is easy now. We need to review the > > other routines with an overflow check too. We run the tests on travis-ci so > > I wonder how intmax_t is different between BSD and GNU. > > the compiler optimizes the overflow check away. Shall we move to use a > routine like __builtin_mul_overflow (if it is available)? > > The below is taken from GNU Smalltalk to see what is happening. With clang > from apple (Apple LLVM version 6.1.0 (clang-602.0.49) (based on LLVM > generates different output depending on -O0 vs. -O3. > > result / b == a seems to be considered always true by the compiler. I don’t know > the C specification but I assume that “a * b” is assumed to never overflow so that > the result of “a * b / b” is certainly “a”. > That's exactly it. Overflow is undefined behavior. The C compiler has a license to ignore undefined behavior because you are not suppose to rely on it. See for example http://smallissimo.blogspot.fr/2015/04/the-more-or-less-defined-behavior-we.html where I explain a similar problem in Squeak VM. And see a fix in http://smallissimo.blogspot.fr/2015/04/removing-ub-in-bytecodeprimmultiply.html. _______________________________________________ help-smalltalk mailing list [hidden email] https://lists.gnu.org/mailman/listinfo/help-smalltalk |
> On 22 May 2015, at 04:00, nicolas cellier <[hidden email]> wrote: > > That's exactly it. Overflow is undefined behavior. > The C compiler has a license to ignore undefined behavior because you are > not suppose to rely on it. Yes, but I couldn’t cite the relevant specification but you did in your blog post. I had pointed Esteban to use “-fsanitize=undefined” in the PharoVM. E.g. there are more issues with bitShift: in Pharo. > And see a fix in > http://smallissimo.blogspot.fr/2015/04/removing-ub-in-bytecodeprimmultiply.html. oh, I think my preference is to go with __builtin_mul_overflow (or for clang the smull variant as it can’t derive the types itself). The benefit of these routines is that one passes plenty of semantics that the compiler can generate efficient code. thanks for hanging out here and commenting! holger _______________________________________________ help-smalltalk mailing list [hidden email] https://lists.gnu.org/mailman/listinfo/help-smalltalk |
> On 22 May 2015, at 05:43, Holger Freyther <[hidden email]> wrote: Hi, >> And see a fix in >> http://smallissimo.blogspot.fr/2015/04/removing-ub-in-bytecodeprimmultiply.html. > > oh, I think my preference is to go with __builtin_mul_overflow (or for clang the smull > variant as it can’t derive the types itself). The benefit of these routines is that one > passes plenty of semantics that the compiler can generate efficient code. The hack solution would be to add -frwapv and I just added this to the build and the integer tests started to work on OSX. I am not sure we want to carry this check all the time. _______________________________________________ help-smalltalk mailing list [hidden email] https://lists.gnu.org/mailman/listinfo/help-smalltalk |
In reply to this post by Stephen Woolerton-2
Just view cose me hard to build this
----- Cara Menggugurkan Kandungan | Obat aborsi cytotec -- Sent from: http://forum.world.st/Gnu-f1290346.html _______________________________________________ help-smalltalk mailing list [hidden email] https://lists.gnu.org/mailman/listinfo/help-smalltalk |
In reply to this post by Stephen Woolerton-2
By reading the article material very very well and this is very useful. cara
menggugurkan hamil <http://carakandunganberhasil.com/> -- Sent from: http://forum.world.st/Gnu-f1290346.html _______________________________________________ help-smalltalk mailing list [hidden email] https://lists.gnu.org/mailman/listinfo/help-smalltalk |
Free forum by Nabble | Edit this page |