Comments (4)
the first problem I suspect is a complicated bug/limitation in rpython's handling of function pointers. I tried to make primites rely less on those in the branch prims-fewer-func-ptrs, which makes the first problem go away. I didn't manage to run tests there yet, but if you do so and they pass, you should just merge the branch.
as soon as I can reproduce the bug in the second traceback, I can try to debug it more. what you can try is get a pdb at the error location, and go up a few frames into eval
, and look for a local variable called "graph" there. that would tell you in which rpython level function the null pointer exception is occurring.
from pycket.
@cfbolz I'm running the tests now and it seems to be working, I'll wait until all of it passes and then merge it. So were you able to successfully run the meta_interp on pypy after this fix?
from pycket.
successfully in the sense that I now get a SchemeException
, meaning it behaves the same as cpython at least.
from pycket.
@cfbolz It seems the null pointer exception on CPython is about the JSONDecoder
and ll_dict
s. I made a little investigation and the error seems to be in the ll_dict_getitem_with_hash
function in rordereddict.py
. However, I still don't see where the null pointer is. As you can see in the pdb ineractions below, everything seems to be a valid pointer.
Note that I'm able to run this on PyPy without any problem.
(Pdb) att
AttributeError("'NoneType' object has no attribute '_getattr'",)
(Pdb) u
> /home/cderici/pycketland/pycket/pypy/rpython/rtyper/llinterp.py(285)eval()
-> nextblock, args = self.eval_block(nextblock)
(Pdb) graph
<FunctionGraph of (rpython.rtyper.lltypesystem.rordereddict:645)ll_dict_getitem_with_hash__dicttablePtr_tuple4Ptr_Signed at 0x7f10edb725d0>
(Pdb) self.args
(<* struct dicttable { num_live_items=28, num_ever_used_items=28, resize_counter=44, indexes=..., lookup_function_no=0, entries=..., fnkeyeq=None, fnkeyhash=None }>, <* struct tuple4 { item0=..., item1=6848, item2=7, item3=3617620788958626453 }>, 3617620788958626453)
(Pdb) self.args[0].lookup_function
<function ll_call_lookup_function_look_inside_iff at 0x7f110b6a7050>
(Pdb) self.args[0].entries
<* array [ odictentry {key=..., value=...}, odictentry {key=..., value=...}, odictentry {key=..., value=...}, odictentry {key=..., value=...}, odictentry {key=..., value=...}, odictentry {key=..., value=...}, odictentry {key=..., value=...}, odictentry {key=..., value=...}, odictentry {key=..., value=...}, odictentry {key=..., value=...}, odictentry {key=..., value=...}, odictentry {key=..., value=...}, (...), odictentry {key=..., value=...}, odictentry {key=..., value=...}, odictentry {key=..., value=...}, odictentry {key=..., value=...}, odictentry {key=..., value=...} ]>
(Pdb) self.args[0].lookup_function_no
0
(Pdb) u
...
(Pdb) u
> /home/cderici/pycketland/pycket/pypy/rpython/rtyper/llinterp.py(285)eval()
-> nextblock, args = self.eval_block(nextblock)
(Pdb) graph
<FunctionGraph of (rpython.rtyper.lltypesystem.rordereddict:642)ll_dict_getitem__dicttablePtr_tuple4Ptr at 0x7f1106428810>
(Pdb) u
...
(Pdb) u
> /home/cderici/pycketland/pycket/pypy/rpython/rtyper/llinterp.py(285)eval()
-> nextblock, args = self.eval_block(nextblock)
(Pdb) graph
<FunctionGraph of (pypy.module._pypyjson.interp_decoder:391)JSONDecoder.decode_key at 0x7f11090c7490>
(Pdb) u
...
(Pdb) u
> /home/cderici/pycketland/pycket/pypy/rpython/rtyper/llinterp.py(285)eval()
-> nextblock, args = self.eval_block(nextblock)
(Pdb) graph
<FunctionGraph of (pypy.module._pypyjson.interp_decoder:243)JSONDecoder.decode_object at 0x7f1109b4bad0>
(Pdb) u
...
(Pdb) u
> /home/cderici/pycketland/pycket/pypy/rpython/rtyper/llinterp.py(285)eval()
-> nextblock, args = self.eval_block(nextblock)
(Pdb) graph
<FunctionGraph of (pypy.module._pypyjson.interp_decoder:76)JSONDecoder.decode_any at 0x7f1109a99450>
...
from pycket.
Related Issues (20)
- sexp_to_ast handles sexps starting with `linklet` wrong HOT 4
- error compiling HOT 3
- `typed/rackunit` crashes HOT 1
- cms->context can crash
- Pycket instantiates modules a different number of times than Racket HOT 1
- ffi programs crash with `procedure-arity` error
- crash in streams.rkt taking car of a vector HOT 1
- .zo size blowup due to env_structure information HOT 7
- (expt 10 -1)
- Error when trying make setup-local-racket HOT 5
- stackfull cell crash HOT 2
- Issues with derived structs/contracts
- Complete expansion fails HOT 1
- Please add the racket topic to this repo HOT 2
- very slow contract execution
- Remove _settled_
- problem with the JsonDecoder on pypy HOT 2
- Building pycket fails for me on debian HOT 1
- Running Pycket fails HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pycket.