1. Phix:getd_all_keys on empty dictionary causes a crash

I think I have this right.

Minimum code to produce crash:

include dict.e 
integer d = new_dict() 
?getd_all_keys(d) 

That crashes for me.

Pete, is that a bug, or am I doing something wrong?

new topic     » topic index » view message » categorize

2. Re: Phix:getd_all_keys on empty dictionary causes a crash

.

new topic     » goto parent     » topic index » view message » categorize

3. Re: Phix:getd_all_keys on empty dictionary causes a crash

euphoric said...

That crashes for me.

Works fine for me here, I get {} as expected.

new topic     » goto parent     » topic index » view message » categorize

4. Re: Phix:getd_all_keys on empty dictionary causes a crash

include dict.e 
integer d = new_dict() 
? getd_all_keys(d) 
 
/* 

Version 0.8.1 (64 bit Linux) Copyright Pete Lomax 2006..2016 
 
------------------------------------------------------------- 
 
 
/usr/local/bin/builtins/dict.e:315 in function traverser() 
index 0 out of bounds, reading sequence length 0 
    res = {} 
    node = 0 
    partial = 0 
    pkey = 0 
    tid = 2 
    rev = 0 
    tt = {} 
    key = <novalue> 
    data = <novalue> 
    left = <novalue> 
    right = <novalue> 
    c = <novalue> 
 
Global & Local Variables 
 
*/ 

be well,
_tom

new topic     » goto parent     » topic index » view message » categorize

5. Re: Phix:getd_all_keys on empty dictionary causes a crash

petelomax said...
euphoric said...

That crashes for me.

Works fine for me here, I get {} as expected.

Looks like _tom is getting the error as well.

Are you using a version of Phix that we don't have?

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu