Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tim and Vanessa TODO #3

Open
6 tasks
vsoch opened this issue Jun 30, 2022 · 5 comments
Open
6 tasks

Tim and Vanessa TODO #3

vsoch opened this issue Jun 30, 2022 · 5 comments

Comments

@vsoch
Copy link
Member

vsoch commented Jun 30, 2022

Last updated: July 6th

array

  • why params in xmm? / how to parse

bigcall

  • needs to parse int128 before review - don't forget if you allocate space for variables and you are going through a parameter and you run out of registers you have to undo all the allocations and put on the stack (for aggregators)

class-inheritance (skipping for now, too many bugs)

  • why all params are 'Export'?
  • Why D is in %xmm?
  • This repr looks exactly like pointer-to-struct.
    • Can we still distinguish these (do we need to)?

fixed-sized-array

  • arrays have type Integer32 instead of aggregate (pointer?)
  • Can we add length (when fixed-size)?

function-as-parameter

  • TBD, these are hard

pointer

  • global pointer should be "(var)"?

struct-pointer-foo

  • No entry for 'bar'

structure-array-of-arrays

  • We're seeing class 'Array', but not the underlying type
  • Can we get sizes (as in fixed-size-array test)?

structure-array-structures

  • same as for structure-array-of-arrays
  • array of pointers will be interesting to make atoms for...

structure-with-structure

  • StructyChild::three needs an extra set of parens because it is itself a pointer
  • It looks like StructyNested is missing from both param decompositions

union

  • Need a repr for unions (non in spec doc)
@hainest
Copy link
Collaborator

hainest commented Jul 12, 2022

amalgamation (split into others)

  • We should uncomment 'intyterny'
  • I think '((%rsi)+8)' should be '(%rsi)+8'
  • We should split this into the other examples (e.g., global-variables)

array

  • eightbytes for array members is unknown. We need a compiler dev.

bigcall

  • We need a representation for __int128_t (known issue)

callsite

  • Let's move the inline function into the 'inline' example
  • No callsite information
    • need this from Dyninst

callsite-1

  • Let's merge this into the callsite example
  • Use an explicit 'extern double func(double d);' to replace the '#include'

callsite-as-parameter

  • Needs callsite info (known issue)

class-inheritance

  • Let's update the A,B,C types to have different field types
    • This will make it easier to validate the atoms
  • All the facts are correct (not after the first bullet, needs check again)
  • Atoms:
    • params 'a', 'b', and 'c' are good
    • param 'd' exercises the ABI rule "If registers have already been assigned for some
      eightbytes of such an argument, the assignments get reverted." This is a known incompleteness.

complex-double

  • All good!

const (was deleted)

  • All good!

empty-func

  • All good!

enum

  • We should include scoped enums with different sizes of underlying types
  • All good!

_exception

  • TBD

_exception-basic

  • TBD

fixed-sized-array

  • We correctly handle array-to-pointer decay
  • All good!

function-as-parameter

  • Let's rename to 'function-pointer'
  • Lots of noise from iostream
    • I think we can have main just return 'invoke(20,10,&add) + invoke(20,10,&multiply)'
  • All good! (not after changes, needs another check)

function-with-pointer

  • All good! (merged in "multiple-pointers" so needs another check.

global-variables

  • We are missing 'thestructure' and 'externstructy'

inline

  • All good! (not yet, we added to this example so needs check again)

math

  • Let's rename to 'static-member-func'
  • All good!

multiple-pointers

  • Let's merge this into 'function-with-pointer'
  • All good!

pointer

  • Let's rename to global-variables-pointers
  • We need a global var pointer repr- maybe "(var)"?

pointer-func

  • Let's merge this into 'function-with-pointer'
  • All good!

pointer-hell

  • Let's rename to 'struct-nested-pointer-to-struct'
  • Missing case 'bar(Bar b)' in atoms.asp
    • It is in the facts
  • Pointer parameters are labelled 'Import' instead of 'Both'
    • They appear to be correct in the facts

pointer-struct

  • Let's move this to 'function-with-pointer'
  • All good!

pointer-to-pointer-to-structure

  • Let's move to 'function-with-pointer'
  • '(((%rdi))+8)' should be '((%rdi))+8'
    • Same problem as 'amalgamation'

pionter-to-struct

  • Let's move to 'function-with-pointer'
  • '((%rdi)+8)' should be '(%rdi)+8'
    • Same problem as 'amalgamation'

struct-pointer-foo

  • Let's move this into 'pointer-hell'
  • There is no atom for 'bar'
    • It is in the facts

struct-typedef

  • Need an indirection for class 'Reference' in atoms
  • Facts are correct!

structure-array-of-arrays

  • Need an example taking a 'Structy' by value
    • This will test our eightbyte parser
  • Can we get sizes (as in fixed-size-array test)?
  • Direction in facts is 'both', but atoms have 'Import'

structure-array-structures

  • We aren't capturing the array-of-pointers type for 'Structy'

structure-matt

  • Needs a better name. Maybe merged elsewhere?
  • No atoms for the global
    • Facts are correct! (if there are missing atoms they aren't totally correct)

structure-with-structure

  • 'StructyNested*' is missing in atoms
    • Correctly represented in the facts

union

  • Need a repr for unions (non in spec doc)

@hainest
Copy link
Collaborator

hainest commented Jul 13, 2022

Green items are ready to have their facts/atoms preserved.

Next time: start with spliced atom bugs.

+ hello
- goodbye
  • 🟩 allocation 🟩

  • array

    • eightbytes for array members is unknown. We need a compiler dev.
  • 🟩 int128 🟩

    • We need a representation for __int128_t (known issue)
  • callsite

    • No callsite information
      • need this from Dyninst
  • callsite-as-parameter

    • Needs callsite info (known issue)
  • class-inheritance

    • Facts:
      • Missing inherited field names for D
      • Locations for param 'd' are incorrect
  • 🟩 enum 🟩

    • Let's add one more with size_t
    • Need to regen facts and atoms
  • _exception

    • TBD
  • _exception-basic

    • TBD
  • 🟩 fixed-sized-array 🟩

  • function-pointer

    • There is an extra function being created called 'unknown'
      • This was likely present previously, I just didn't see it
  • 🟩function-with-pointer 🟩

    • Fields are getting extra parens when the struct is passed by pointer
      • e.g., ((%rdi)+8) should be (%rdi)+8
  • 🟩 global-variables 🟩

    • We are missing atoms for 'thestructure' and 'externstructy'
  • 🟩 inline 🟩

  • multiple-pointers

    • We can remove
  • 🟩 pointer 🟩

    • Let's rename to global-variables-pointers
    • We need a global var pointer repr- maybe "(var)"?
  • pointer-func

    • Let's merge this into 'function-with-pointer'
  • pointer-hell

    • Missing case 'bar(Bar b)' in atoms.asp
      • It is in the facts
    • Pointer parameters are labelled 'Import' instead of 'Both'
      • They appear to be correct in the facts
  • struct-typedef

    • Need an indirection for class 'Reference' in atoms
    • Facts are correct!
  • structure-array-of-arrays

    • Need an example taking a 'Structy' by value
      • This will test our eightbyte parser
    • Can we get sizes (as in fixed-size-array test)?
    • Direction in facts is 'both', but atoms have 'Import'
  • structure-array-structures

    • We aren't capturing the array-of-pointers type for 'Structy'
  • structure-simple

    • No atoms for the global
      • Facts are correct! (if there are missing atoms they aren't totally correct)
  • structure-with-structure

    • 'StructyNested*' is missing in atoms
      • Correctly represented in the facts- need a repr for opaque types
  • union

    • Need a repr for unions (non in spec doc)

@hainest
Copy link
Collaborator

hainest commented Jul 18, 2022

Green items are ready to have their facts/atoms preserved.

  • 🆘 array 🆘

    • eightbytes for array members is unknown. We need a compiler dev.
  • 🆘 callsite 🆘

    • No callsite information
      • need this from Dyninst
  • 🆘 callsite-as-parameter 🆘

    • Needs callsite info (known issue)
  • 🟩 [x] class-inheritance 🟩

    • Facts:
      • Missing inherited field names for D (don't need them)
      • Locations for param 'd' are incorrect
  • _exception

    • TBD
  • _exception-basic

    • TBD
  • 🟩 [x] function-pointer (not changing per Matt's comments for now) 🟩

    • There is an extra function being created called 'unknown'
      • This was likely present previously, I just didn't see it
  • 🟩 [x] pointer-hell 🟩

    • Missing case 'bar(Bar b)' in atoms.asp
  • 🟩 struct-typedef 🟩

    • Need an indirection for class 'Reference' in atoms
    • Facts are correct!
  • structure-array-of-arrays

    • 🆘 Need an example taking a 'Structy' by value 🆘
      • This will test our eightbyte parser
    • Can we get sizes (as in fixed-size-array test)?
    • Direction in facts is 'both', but atoms have 'Import'
  • 🟩 structure-array-structures 🟩

    • We aren't capturing the array-of-pointers type for 'Structy'
  • 🟩 structure-simple 🟩

    • No atoms for the global
  • 🟩 structure-with-structure 🟩

    • 'StructyNested*' is missing in atoms
      • Correctly represented in the facts- need a repr for opaque types
  • 🆘 union 🆘

    • Need a repr for unions (non in spec doc)
    • Ben need feedback about constructing 8bytes (or not) for unions - ABI doc is not clear. We want a single location for the entire union, but in the current model treating as an aggregate, we are giving different locations to fields.
  • Meeting with Matt:

    • var that are structs need offsets

@hainest
Copy link
Collaborator

hainest commented Jul 19, 2022

Future Work

The updated ABI doc from 2022 has more information. We'll want to update items accordingly.

  • arguments of type __int128 that are stored in memory must be aligned on a 16-byte boundary
  • A more concrete _BitInt(N) description of integer types
  • "small" floating point types; e.g., __bf16
  • The 64-bit mantissa of arguments of type long double belongs to class X87, the 16-bit exponent plus 6 bytes of padding belongs to class X87UP.

@vsoch
Copy link
Member Author

vsoch commented Jul 20, 2022

Updated 7/22

  • TODO next Vanessa and Tim: look at vtables

  • 🆘 array 🆘

    • eightbytes for array members is unknown. We need a compiler dev.
  • 🆘 callsite 🆘

    • No callsite information
      • need this from Dyninst
  • 🆘 callsite-as-parameter 🆘

    • Needs callsite info (known issue)
  • _exception

    • TBD
  • _exception-basic

    • TBD
  • structure-array-of-arrays

    • 🆘 Need an example taking a 'Structy' by value 🆘
      • This will test our eightbyte parser
    • Can we get sizes (as in fixed-size-array test)?
    • Direction in facts is 'both', but atoms have 'Import'
  • 🆘 union 🆘

    • Need a repr for unions (non in spec doc)
    • Ben need feedback about constructing 8bytes (or not) for unions - ABI doc is not clear. We want a single location for the entire union, but in the current model treating as an aggregate, we are giving different locations to fields.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants