github2-x
2018-12-4 15:00:28

github2-x
2018-12-4 15:10:24

github2-x
2018-12-4 15:16:11

github2-x
2018-12-4 16:12:47

github2-x
2018-12-4 16:17:27

github2-x
2018-12-4 18:00:42

samth
2018-12-4 18:27:33

@cadr the segfault is in port-next-location, which assumes that any struct is a certain kind of struct


samth
2018-12-4 18:27:51

I think you wrote that code and I’m not sure what it’s supposed to do


cadr
2018-12-4 18:29:03

@samth do we know the input that makes it error?


samth
2018-12-4 18:29:23

it’s a print-port-info struct


samth
2018-12-4 18:31:27
Traceback (most recent call last):
  File "/home/samth/sw/pycket/pycket/__main__.py", line 32, in main
    sys.exit(f(sys.argv))
  File "/home/samth/sw/pycket/pycket/entry_point.py", line 46, in entry_point
    return actual_entry(argv)
  File "/home/samth/sw/pycket/pycket/entry_point.py", line 103, in actual_entry
    racket_entry(names, config, pycketconfig, current_cmd_args)
  File "/home/samth/sw/pycket/pycket/racket_entry.py", line 246, in racket_entry
    namespace_require_plus(require_spec, pycketconfig)
  File "/home/samth/sw/pycket/pycket/racket_entry.py", line 200, in namespace_require_plus
    namespace_require.call_interpret([m], pycketconfig)
  File "/home/samth/sw/pycket/pycket/base.py", line 73, in call_interpret
    return interpret_one(ast, env, cont)
  File "/home/samth/sw/pycket/pycket/interpreter.py", line 2601, in interpret_one
    inner_interpret(ast, env, cont)
  File "/home/samth/sw/pycket/pycket/interpreter.py", line 2558, in inner_interpret_two_state
    ast, env, cont = ast.interpret(env, cont)
  File "/home/samth/sw/pycket/pycket/cont.py", line 373, in interpret
    return func(*args)
  File "/home/samth/sw/pycket/pycket/interpreter.py", line 840, in safe_return_multi_vals
    return cont.plug_reduce(vals, env)
  File "/home/samth/sw/pycket/pycket/cont.py", line 315, in plug_reduce
    return func(*args)
  File "/home/samth/sw/pycket/pycket/prims/general.py", line 1366, in struct_port_loc_cont
    lin = pr.get_line()
AttributeError: 'W_StructSize7' object has no attribute 'get_line'
> /home/samth/sw/pycket/pycket/prims/general.py(1366)struct_port_loc_cont()
-> lin = pr.get_line()
(Pdb)
(Pdb) p pr
<rpython.tool.pairtype.W_StructSize7 object at 0x0000558371914090>
(Pdb) p pr.tostring()
'#<print-port-info>'

samth
2018-12-4 18:45:47

line 1542 of racket/pretty.rkt


cadr
2018-12-4 18:47:09

@samth yeah I have a strong hypothesis on exactly what the issue is, fixing it now


samth
2018-12-4 18:50:53

pycket-c-linklets -e "(require racket/pretty)" -e "(pretty-print 1)" segfaults


github2-x
2018-12-4 18:52:13

github2-x
2018-12-4 18:53:38

github2-x
2018-12-4 18:53:40

github2-x
2018-12-4 18:54:45

github2-x
2018-12-4 18:59:14

github2-x
2018-12-4 19:06:36

cadr
2018-12-4 20:06:23

(module p ’#%kernel (define-values (struct:printing-port make-printing-port printing-port? printing-port-port printing-port-info) (let-values (((struct: make- ? -ref -set!) (let-values () (let-values () (#%app make-struct-type ‘printing-port ’#f ‘2 ’0 ’#f (#%app list (#%app cons prop:output-port ‘1) (#%app cons prop:input-port ’1)) (#%app current-inspector) ’#f ’(0 1) ’#f ‘printing-port))))) (#%app values struct: make- ? (#%app make-struct-field-accessor -ref ’0 ’port) (#%app make-struct-field-accessor -ref ’1 ’info)))) (define-values (w) (#%app open-output-string)) (#%app write ’“hey” w) (define-values (p) (#%app make-printing-port w ’dummy)) (define-values (a b c) (#%app port-next-location p)) (#%app printf "~a ~a ~a\n" a b c))


github2-x
2018-12-4 20:38:11

github2-x
2018-12-4 20:47:21

cadr
2018-12-4 21:29:14

I’m getting this error when compiling contract/private/object.rkt -> #<procedure:rhs?> boolean? listof #<procedure:sattr?:1> #<procedure:rhs?> <collects>/syntax/parse/private/rep.rkt ERROR : fixup-rhs: contract violation expected: #<procedure:rhs?> given: #s(rhs (#s(attr value 0 #f)) #t #<syntax> (#s(variant #<syntax> (#s(attr value 0 #f) #s(attr x 0 #t)) #s(pat:and (#s(pat:ord #s(pat:fixup #<syntax> #<syntax> #<syntax> #<syntax> #s(arguments () () ()) #f #f) group2 0) #s(pat:ord #s(pat:action #s(action:and (#s(action:ord #s(action:post #s(action:fail #<syntax> #<syntax>)) group1 0) #s(action:bind #s(attr #<syntax> 0 #f) #<syntax>) #s(action:ord #s(action:post #s(action:fail #<syntax> #<syntax>)) group1 2) #s(action:ord #s(action:post #s(action:fail #<syntax> #<syntax>)) group1 3) #s(action:do (#<syntax>)))) #s(pat:any)) group2 1))) ())) () #t #t) in: the 1st argument of contract from: blaming: <collects>/syntax/parse/private/parse.rkt (assuming the contract is correct) at: <collects>/syntax/parse/private/rep.rkt:1.0


samth
2018-12-4 21:32:08

i get that too


samth
2018-12-4 21:32:14

but did you remove all your zo files?


samth
2018-12-4 21:32:28

I’m trying again with no zo files


samth
2018-12-4 21:33:00

also, I don’t understad the issue with liberal-define-context?


samth
2018-12-4 21:33:07

it’s in general.py


samth
2018-12-4 21:33:12

with the right conditional


samth
2018-12-4 21:33:16

can you take a look?


cadr
2018-12-4 21:33:36

@samth sure


cadr
2018-12-4 21:33:54

Also I didn’t clean the zo files myself, I just ran make recompile-racket-modules


cadr
2018-12-4 21:37:43

@samth 15 / 266 failed with that fixup-rhs: contract violation error above


samth
2018-12-4 21:41:32

yes, I get that with just running racket/contract/private/object with -c


samth
2018-12-4 21:41:45

I think it’s a duplicate module error again


samth
2018-12-4 21:41:59

can you use the instrumentation you used before to look at it?


cadr
2018-12-4 21:42:38

@samth sure, let me reproduce it first


github2-x
2018-12-4 21:43:21

github2-x
2018-12-4 22:00:34

github2-x
2018-12-4 22:09:30

github2-x
2018-12-4 22:15:35

samth
2018-12-4 22:29:10
> (require syntax/parse/private/rep-data)
> rhs?
#<procedure:rhs?>
> (rhs? (rhs #f #F #F #f #F))
exn:fail : #<procedure:rhs>: wrong number of arguments; expected 7 but got 5
> (rhs? (rhs #f #F #F #f #F #f #f))
#t
> (rhs? #s(rhs #f #F #F #f #F #f #f))
#f
>

github2-x
2018-12-4 23:19:30

github2-x
2018-12-5 00:30:43

github2-x
2018-12-5 00:52:23

github2-x
2018-12-5 01:01:01

github2-x
2018-12-5 01:02:15

github2-x
2018-12-5 01:44:56