devsoc-unsw / structs.sh

An educational data structures and algorithms platform.
https://structs.sh
MIT License
27 stars 7 forks source link

pycparser errors on array of pointers to chars #685

Open yellowsubmarine1447 opened 1 month ago

yellowsubmarine1447 commented 1 month ago

to reproduce, define an array of pointers to chars (e.g. https://discord.com/channels/1176386842724159608/1240289425284661259/1268859481979093014 but with adjLists as a list of char pointers not struct pointers). Issue is that, when parsing array elements, sometimes we get an actual address which may point to a string, which is formatted differently and doesn't directly translate to something eval'able

e.g.:

blah = {0x7ffff7fc1000 "\177ELF\002\001\001", 0x10101000000 <error: Cannot access memory at address 0x10101000000>, 0x2 <error: Cannot access memory at address 0x2>, 0xbfebfbff <error: Cannot access memory at address 0xbfebfbff>, 0x7fffffffe259 "x86_64"}