GNU Smalltalk - issues en gst-parse.c:605:21: warning: unknown conversion type character 'O' in format [-Wformat=] Source code is printf ("returned value is %O\n", _gst_last_returned_value); Plenty of duplicates in the same file. Fri, 02 Mar 2018 05:33:05 -0700 GNU Smalltalk Parameter parsing in gst-tool.c can cause out of bounds reads In gst-tool.c there is a loop that compares a given long option with the available long options. It uses a memcmp call for that with the length of the given option. This will cause out of bounds heap reads (that can be detected with address sanitizer), because many of the available options will be shorter than a given option. Changing memcmp to strncmp corrects this bug and will avoid reading the option strings beyond a terminating zero. See attached patch. This patch is against the latest test version 3.2.91. Thu, 04 Feb 2016 12:46:14 -0700 GNU Smalltalk Make fails under OS X 10.10.3 (Yosemite) Make ends with a couple of hard errors. Configure ran to the end, but with many warnings. Not sure how to troubleshoot this. I reran make, and here is the output. By the way, same result with 3.2.5. Marks-iMac:smalltalk-3.2.90 markwallace$ make /Applications/ all-recursive Making all in lib-src make[2]: Nothing to be done for `all'. Making all in lightning ln -s -f ./i386/asm-i386.h asm-i386.h ln -s -f ./i386/core-i386.h core-i386.h Making all in snprintfv /Applications/ all-recursive Making all in snprintfv /Applications/ all-am make[4]: Nothing to be done for `all-am'. Making all in libgst Mon, 11 May 2015 22:08:02 -0700 GNU Smalltalk extend DLD to support loading Mac OS X frameworks I get <pre> ./genbc ./byte.def ./byte.c ./opt.c ./xlat.c > match.h /bin/sh: line 1: 60172 Segmentation fault ./genbc ./byte.def ./byte.c ./opt.c ./xlat.c > _match.h make[2]: *** [match.stamp] Error 139 </pre> gdb says <pre> (gdb) run byte.def byte.c opt.c xlat.c Starting program: /opt/local/var/macports/build/_Users_damien_var_macports_lang_gst-dev/work/gst-dev-1.0/libgst/genbc byte.def byte.c opt.c xlat.c Reading symbols for shared libraries +. done Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_INVALID_ADDRESS at address: 0x000000000000007e Wed, 30 Sep 2009 07:13:34 -0700 GNU Smalltalk Manual & Class Library Links Are Not Accessable The links to the user manual and class libraries found here ( result in a timeout error when followed. The URLs are: Tue, 23 Dec 2014 20:04:05 -0700 GNU Smalltalk autoreconf fails in 64 bit LinuxMint I have a 64 bit LinuxMint system with autoreconf version 2.69, libtool & build-essentials installed. I am using the latest GIT version of GNU Smalltalk. I get this: $ autoreconf -fvi autoreconf: Entering directory `.' autoreconf: not using Gettext autoreconf: running: aclocal --force -I build-aux autoreconf: tracing autoreconf: adding subdirectory snprintfv to autoreconf autoreconf: Entering directory `snprintfv' autoreconf: running: aclocal --force -I ../build-aux autoreconf: not using Libtool autoreconf: running: /usr/bin/autoconf --force error: possibly undefined macro: AC_LIBTOOL_WIN32_DLL If this token and others are legitimate, please use m4_pattern_allow. See the Autoconf documentation. Fri, 28 Nov 2014 21:58:43 -0700 GNU Smalltalk "DateTime printOn:" output cannot be parsed with "DateTime readFrom:" Unlike Date, Time, Duration the DateTime instance cannot be initialized with a string which is generated by DateTime itself. <pre> st> DateTime now 2014-08-24T17:50:20+04:00 st> DateTime readFrom: stdin 2014-08-24T17:50:20+04:00 2014-10-13T20:04:00+00:00 </pre> The DateTime prints itself as YYYY-MM-DD + 'T' + HH:MM:SS + [(+|-)HH:MM[:SS]] (or [Date]T[Time][+-Offset]) and these format hardcoded. However readFrom: expects [Date] [Duration]. An offset should be set with offset: aDuration messsage. <pre> st> dt := DateTime readFrom: stdin 2014-08-24 00:17:50:20 2014-08-24T17:50:20+00:00 st> dt offset: (Duration days: 0 hours: 4 minutes: 0 seconds: 0) 2014-08-24T17:50:20+04:00 </pre> So there is now way to read/write date and time simultaneously. Sun, 24 Aug 2014 07:40:58 -0700 GNU Smalltalk URL decodedFields causes ArgumentOutOfRange exception <pre>url := URL fromString: '?key=value'. fields := url decodedFields. fields printNl. Object: 'key=value' error: Invalid argument 0: argument must be between 4 and 9 SystemExceptions.ArgumentOutOfRange(Smalltalk.Exception)>>signal ( SystemExceptions.ArgumentOutOfRange(Smalltalk.Exception)>>signal: ( SystemExceptions.ArgumentOutOfRange class>>signalOn:mustBeBetween:and: ( Smalltalk.String(Smalltalk.ArrayedCollection)>>copyFrom:to: ( [] in URL>>decodedFields ( Smalltalk.OrderedCollection>>do: ( URL>>decodedFields ( Smalltalk.UndefinedObject>>executeStatements ( nil </pre> Sat, 16 Aug 2014 05:10:46 -0700 GNU Smalltalk Line numbers not reported at start of blocks At the start of a block, a line number bytecode is not generated. This is compounded when blocks contain only statements that are messages to blocks or when blocks are stored for later evaluation. The following code will highlight this: [ [ Processor activeProcess context backtrace ] value. [ Processor activeProcess context backtrace ] value ] value Evaluation will produce: optimized [] in UndefinedObject>>executeStatements ( optimized [] in UndefinedObject>>executeStatements ( UndefinedObject>>executeStatements ( optimized [] in UndefinedObject>>executeStatements ( optimized [] in UndefinedObject>>executeStatements ( Sat, 10 May 2014 09:25:47 -0700 GNU Smalltalk STInST and gst-parse.c are inconsistent on parsing trailing '.' STInST and gst-parse.c are inconsistent about a trailing '.' at the end of the class definition. E.g. like this: <code> Object subclass: Test [ ]. </code> It has been found while trying to load Cairo with the 'Compiler' package. Mon, 09 Sep 2013 01:16:03 -0700 GNU Smalltalk Debug report wrong line number When in a VisualGST workspace I debug '1 printNl' I step multiple times to : Integer>>#printString: after two steps it goes to the wrong line number (14) when it should be 8 or 6. It seems that ^lineMap at: (aContext ip + 1 max: 1) ifAbsent: [1] fix the problem in Debugger>>currentLineIn: Tue, 28 May 2013 01:48:12 -0700 GNU Smalltalk Infinite re-cursion on VisualGST inspector I'm loading some code (OsmoMGCP) with the STClassLoader and then using VisualGST to inspect the code. I end up with an infinite crash re-cursion like this: <code> (ip 10)ProxyNamespace>>#printOn: (ip 20)ProxyNamespace(Object)>>#printString (ip 44)UnhandledException>>#defaultAction (ip 4)[] in Exception>>#resignalAsUnhandled: (ip 42)MethodContext(ContextPart)>>#scanBacktraceFor:do: (ip 36)MessageNotUnderstood(Exception)>>#resignalAsUnhandled: (ip 8)MessageNotUnderstood(Exception)>>#defaultAction (ip 2)[] in Exception>>#instantiateDefaultHandler (ip 16)MessageNotUnderstood(Exception)>>#activateHandler: (ip 24)MessageNotUnderstood(Exception)>>#signal (ip 20)ProxyNamespace(Object)>>#doesNotUnderstand: (ip 18)ProxyNamespace(BindingDictionary)>>#doesNotUnderstand: Sat, 30 Mar 2013 09:28:19 -0700 GNU Smalltalk Parsing of selectors with underscore is broken When parsing the GemStone MontiCello definition I stumbled about two issues: <code> st> STInST.RBParser parseExpression: 'self _foo' RBAssignmentNode(self := foo) st> STInST.RBParser parseExpression: '[:x:y | x+y]' Object: RBParser new "<0x55913658>" error: (a #String):1: Variable name expected Error(Exception)>>signal ( ... </code> According to ANSI Smalltalk the '_' is reserved by the implementation. Either we parse it or we reject it but it is certainly not an assignment? The other one appears to be valid according to ANSI Smalltalk. Sat, 23 Mar 2013 14:31:10 -0700 GNU Smalltalk Kernel.ConcatenatedStream fails when re-positioned The following code is working with a ReadStream but is failing with the ConcatenatedStream. <code> st> (Kernel.ConcatenatedStream with: ('3' readStream)) next; position: 0; next: 1 Object: ConcatenatedStream new "<0x558b6810>" error: premature end of stream: 1 element(s) missing SystemExceptions.NotEnoughElements(Exception)>>signal ( SystemExceptions.NotEnoughElements class>>signalOn: ( Kernel.ConcatenatedStream(Stream)>>next:into:startingAt: ( Kernel.ConcatenatedStream(Stream)>>next: ( UndefinedObject>>executeStatements (a String:1) </code> Sun, 10 Feb 2013 09:29:32 -0700 GNU Smalltalk Parsing state not properly reset on parse error st> #(String stdin:2: expected true, false or nil st> 3+3 st> st> st> st> st> . 6 st> st> st> 3+3 st> ) 6 stdin:11: expected expression st> stdin:13: expected expression st> st> stdin:15: expected expression st> st> stdin:17: expected expression st> st> stdin:19: expected expression st> st> stdin:21: expected expression st> st> stdin:23: expected expression st> 6+2 st> stdin:25: expected expression st> st> stdin:27: expected expression st> . st> stdin:29: expected expression Mon, 03 Dec 2012 14:03:37 -0700 GNU Smalltalk Redefining a class and accessing an old selector/variable can abort the VM The attached code redefines a class (by accident) and using the old selectors will lead to an abort. a Smalltalk string:2: assignment to undeclared variable adm_state a Smalltalk string:2: assignment to undeclared variable op_state Bytecode verification failed: receiver variable out of range Method verification failed for OMLSubclass>>#admState: Aborted (ip 20)UndefinedObject>>#executeStatements (ip 0)<bottom> Aborted Wed, 01 Aug 2012 06:28:29 -0700 GNU Smalltalk CompiledMethod postCopy Hi, postCopy doesn't work correctly, code is commented and the logic of makesLiteralReadOnly is not good. Fri, 02 Mar 2012 02:04:45 -0700 GNU Smalltalk invalid symlinks created when destination directory is a symlink $ mkdir t1 $ mkdir t1/t2 $ ln -sf t1/t2 t2 $ ./gst GNU Smalltalk ready st> (File name: '') symlinkAs: 't2/' <File /home/pbonzini/devel/gst/+build/> st> ^Z $ ls -l t2/ total 0 Reported by Jan Luebbe. lrwxrwxrwx 1 pbonzini pbonzini 11 Nov 28 17:59 -> ../ The right path should be ../../ (because the symlink is from t1/t2/ Mon, 28 Nov 2011 10:02:01 -0700 GNU Smalltalk visualGST: can't start workspace visualGST 0.8.0 on Fedora 15 x86_64, KDE desktop. From browser cannot start workspace using icon or file menu. No error message. gst-blox seems to work fine. Thu, 06 Oct 2011 20:36:44 -0700 GNU Smalltalk Array printing aesthetic error Arrays always print an extra space before the final parenthesis: st> #(1 2 3) (1 2 3 ) st> #($a $b $c) ($a $b $c ) Extra space is fine but it should be consistent. Either put an additional extra space after the first parenthesis or remove the extra space altogether. Sun, 07 Aug 2011 11:11:58 -0700 GNU Smalltalk