Hello.
I localized the error finally. Whew!
Yes, it is *only* on 32-in-64 and it is reproducible with 100% on
FreeBSD and CentOS.
I prepared simple code for reproduce the error.
It is FFI callback.


> cat callback.c
void foo ( int n, void (*fn) (int) ) {
        int i = 1;
        while (n--) {
                (*fn)(i++);
        }
        return;
}


> cat cb-poly.sml
open Foreign
val mylib = loadLibrary "callback.so"
val foo = buildCall2 ((getSymbol mylib "foo"), (cInt, cFunction), cVoid)
val cb = buildClosure1 ((fn v => print ((Int.toString v) ^ "\n")), cInt, cVoid)
val _ = foo(3, cb)


> cc -shared -o callback.so callback.c
> env LD_LIBRARY_PATH=. poly --script cb-poly.sml

вт, 22 янв. 2019 г. в 17:51, David Matthews <david.matth...@prolingua.co.uk>:
>
> Thanks for the report.  Did you see anything similar with the native
> code version?  It could be a code-generator problem which would affect
> other versions or it could be something specific to 32-in-64.
> Unfortunately the stack trace doesn't tell me much other than that it
> looks as though it failed in ML code.  Anything you can do to narrow
> down the problem and make it reproducible would be helpful.
>
> Regards,
> David
>
> On 22/01/2019 09:32, Kostirya wrote:
> > Hello.
> > I got one error with compact32bit on 64bit:
> >
> > (gdb) bt
> > #0  0x00000000821f5400 in ?? ()
> > #1  0x00000000ff9ab2b0 in ?? ()
> > #2  0x00000000ff9ab2b2 in ?? ()
> > #3  0x0000000d021fff10 in ?? ()
> > #4  0x0000000d821f9e1c in ?? ()
> > #5  0x0000000d821f9f00 in ?? ()
> > #6  0x0000000d021fff38 in ?? ()
> > #7  0x00000000fffc3c10 in ?? ()
> > #8  0x00000000fffc3c14 in ?? ()
> > #9  0x00000000fffc3c26 in ?? ()
> > #10 0x0000000d821f9a25 in ?? ()
> > #11 0x0000000d021fff98 in ?? ()
> > #12 0x00000000fffc3c2e in ?? ()
> > #13 0x00000000fffc04b2 in ?? ()
> > #14 0x00000000fffbf892 in ?? ()
> > #15 0x0000000d821ea5b2 in ?? ()
> > #16 0x00000000fffc3c58 in ?? ()
> > #17 0x00000000fffc04b2 in ?? ()
> > #18 0x00000000fffbf928 in ?? ()
> > #19 0x00000000fffbf916 in ?? ()
> > #20 0x0000000d821e9646 in ?? ()
> > #21 0x0000000d821e29c8 in ?? ()
> > #22 0x0000000d821e29d7 in ?? ()
> > #23 0x0000000d021fffc0 in ?? ()
> > #24 0x00000000fffbf4a0 in ?? ()
> > #25 0x00000000fffbf4aa in ?? ()
> > #26 0x0000000d821e21ac in ?? ()
> > #27 0x0000000d821e21b6 in ?? ()
> > #28 0x0000000d021fffd8 in ?? ()
> > #29 0x0000000d821e203a in ?? ()
> > #30 0x0000000d821e204a in ?? ()
> > #31 0x0000000d021ffff0 in ?? ()
> > #32 0x00000008008acab5 in X86AsmRaiseException () from
> > /home/nick/polyml_compact32bit_debug/lib/libpolyml.so.9
> > #33 0x00000008008acab5 in X86AsmRaiseException () from
> > /home/nick/polyml_compact32bit_debug/lib/libpolyml.so.9
> > #34 0x0000000000000001 in ?? ()
> > Backtrace stopped: Cannot access memory at address 0xd02200000
_______________________________________________
polyml mailing list
polyml@inf.ed.ac.uk
http://lists.inf.ed.ac.uk/mailman/listinfo/polyml

Reply via email to