OASIS Static Analysis Results Interchange Format (SARIF) TC

 View Only
  • 1.  Re: [sarif] #401: Improved design of address object design

    Posted 04-29-2019 19:46



    The unknown is only for this address to its parents.  The same problem exists whether you use -1 or unknownOffset/Length. It is useful to know offsets up to the point of where it is unknown as you at least know it is relative to this address (grand..)parent
    object.  The cleaner approach to working around the SDK not supporting nullable is to use the extra boolean.

    On 4/29/19 2:18 PM, Larry Golding (Myriad Consulting Inc) wrote:





    I really think my previous suggestion of
    growthDirection is the least bad alternative if we decide NOT to use
    Nullable<int> . I d modify my proposal to a
    Boolean growsTowardLowMemory , default
    false .
     


    From:
    sarif@lists.oasis-open.org
    <sarif@lists.oasis-open.org> On Behalf Of Larry Golding (Myriad Consulting Inc)
    Sent: Monday, April 29, 2019 11:46 AM
    To: James Kupsch
    <kupsch@cs.wisc.edu> ; Michael Fanning
    <Michael.Fanning@microsoft.com> ; OASIS SARIF TC Discussion List
    <sarif@lists.oasis-open.org>
    Subject: RE: [sarif] #401: Improved design of address object design
    Importance: High


     
    I m not as happy as I was a few moments ago. If the unknown properties default to
    false , then if you don t populate
    offsetFromParent (which happens at the top of every parent chain) or
    length (which can happen anywhere along the parent chain), then you have to remember to set the corresponding unknown property. You won t. Of if the unknown properties default to
    true , you have to set them to
    false whenever you do populate offsetFromParent or
    length . You won t.
     
    Michael (addressing this question specifically to him because of the SDK impact), I don t see a good alternative to
    Nullable<int> . Please let us know your opinion. Raising to red-bang.
     
    Larry
     


    From: Larry Golding (Myriad Consulting Inc)
    Sent: Monday, April 29, 2019 11:37 AM
    To: James Kupsch < kupsch@cs.wisc.edu >; Michael Fanning < Michael.Fanning@microsoft.com >; OASIS SARIF TC Discussion
    List < sarif@lists.oasis-open.org >
    Subject: RE: [sarif] #401: Improved design of address object design


     
    I could accept Boolean unknownLength and unknownOffsetFromParent, default false for both.
     
    I will write it this way and send a draft. I can always change this aspect of the design if the TC objects.
     
    Larry
     



  • 2.  RE: [sarif] #401: Improved design of address object design

    Posted 04-29-2019 19:57




    Here s my suggestion:
     
    For address.length, use a sentinel value of 0 meaning not provided . This makes sense, as Jim noted, a 0 length memory address isn t sensible. You don t posit describing an insertion point in memory that
    shoves everything to the right.