Skip to content
This repository has been archived by the owner on Nov 20, 2023. It is now read-only.

CTF parser and unknown enum values: NULL exception #78

Open
compudj opened this issue Oct 31, 2018 · 2 comments
Open

CTF parser and unknown enum values: NULL exception #78

compudj opened this issue Oct 31, 2018 · 2 comments

Comments

@compudj
Copy link

compudj commented Oct 31, 2018

The CTF parser gets a NULL exception in the following scenario: an enumeration contains a set of labels mapped to specific values, and in the trace stream, an integer value read from the stream (which is the container for the enumeration) maps to none of the labels.

@compudj
Copy link
Author

compudj commented Nov 1, 2018

I think we may want to consider allowing the ctf reader to deal with NULL enum entries
without exception, and allow it to return NULL label "strings", and audit all callers that need to
look at those strings (e.g. detailed event list) to map this NULL to e.g. "".

Turning NULL into "" is something that should belong at the presentation level,
not at the ctf reader level IMHO.

@compudj
Copy link
Author

compudj commented Dec 18, 2018

I think someone suggested at some point to return "" rather than NULL when a label does not exist.

But considering that "" is a valid string for an existing label, it seems more appropriate to ensure the callers can handle NULL.

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

No branches or pull requests

1 participant