[Vm-dev] primitiveFailForOSError: causes assertion failure in the simulator
Alistair Grant
akgrant0710 at gmail.com
Thu Oct 25 17:53:02 UTC 2018
Hi Eliot,
On Thu, Oct 25, 2018 at 10:34:24AM -0700, Eliot Miranda wrote:
>
> Hi Alistair,
>
>
>
> On Thu, Oct 25, 2018 at 9:49 AM Alistair Grant <akgrant0710 at gmail.com> wrote:
>
>
> Hi Eliot,
>
> On Tue, Oct 23, 2018 at 06:38:41AM +0000, Alistair Grant wrote:
> > Hi Eliot,
> >
> > Calling #primitiveFailForOSError: fails in the simulator (I guess I'm
> > the first person to use it :-)). It works properly in a real VM, of
> > course.
>
> I (think) I take this back. It looks like the debug VM will crash in
> about the same place:
>
>
> $ ~/vmmaker/opensmalltalk-vm/products/debug/cogspur64linuxht/pharo -gdb
> Pharo.image
>
> run Pharo.image
>
> GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1
> Copyright (C) 2016 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/
> gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law. Type "show copying"
> and "show warranty" for details.
> This GDB was configured as "x86_64-linux-gnu".
> Type "show configuration" for configuration details.
> For bug reporting instructions, please see:
> <http://www.gnu.org/software/gdb/bugs/>.
> Find the GDB manual and other documentation resources online at:
> <http://www.gnu.org/software/gdb/documentation/>.
> For help, type "help".
> Type "apropos word" to search for commands related to "word"...
> Reading symbols from /home/alistair/vmmaker/opensmalltalk-vm/products/debug
> /cogspur64linuxht/lib/pharo/5.0-201810160053-FileAttributesPlugin203/
> pharo...done.
> (gdb) run Pharo.image
> Starting program: /home/alistair/vmmaker/opensmalltalk-vm/products/debug/
> cogspur64linuxht/lib/pharo/5.0-201810160053-FileAttributesPlugin203/pharo
> Pharo.image
> [Thread debugging using libthread_db enabled]
> Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
> [New Thread 0x7ffff625f700 (LWP 15319)]
>
>
> OK, I'll take a look. I wonder have you installed the prototype in the
> specialObjectsArray?
Yes (in pharo):
| error |
error := ((SmalltalkImage current specialObjectsArray) at: 52) at: 21.
{ error. error errorName. error errorCode. }
" an Array(
a PrimitiveError
#'operating system error'
nil)"
> newArray at: 52 put: #(nil "nil => generic error" #'bad receiver'
> #'bad argument' #'bad index'
> #'bad number of arguments'
> #'inappropriate operation' #'unsupported operation'
> #'no modification' #'insufficient object memory'
> #'insufficient C memory' #'not found' #'bad method'
> #'internal error in named primitive machinery'
> #'object may move' #'resource limit exceeded'
> #'object is pinned' #'primitive write beyond end of object'
> #'object moved' #'object not pinned' #'callback error'),
> {PrimitiveError new errorName: #'operating system error'; yourself.
> ExceptionInFFICallError new errorName: #'exception in FFI call'; yourself}.
Pharo doesn't yet have ExceptionInFFICallError in the special objects
array. If it's ready for porting, I can submit a PR to add it to Pharo.
Cheers,
Alistair
More information about the Vm-dev
mailing list