• Brenden Blanco's avatar
    Add check for number of arguments · 977091ec
    Brenden Blanco authored
    There are two problems here:
     1. bcc is leaving the extra function parameters in the prototype, when
     these really just serve as an annotation on the method being traced.
     They aren't really passed into the function. LLVM lowering phase later
     errors out on such functions.
     2. bcc doesn't limit the size of the argument list, when currently it
     just supports up to the number of arguments held in registers (6).
    
    Fix 1. by rewriting the arguments out of the prototype and into the
    preamble where they are currently being initialized.
    Fix 2. by enforcing the limit and returning a more meaningful error
    message.
    
    Added a test case.
    
    Extra fix included for string type on python3.
    
    Fixes: #497
    Signed-off-by: default avatarBrenden Blanco <bblanco@plumgrid.com>
    977091ec
test_stackid.py 1.49 KB