Skip to content

SML: Segfault when accessing null pointer without error message #451

@moschmdt

Description

@moschmdt

This is not a bug, rather more a quality of live improvement suggestion

When reading the output link via SML (FindAttribute) and one attribute does not exist results in a returned null pointer. Reading the null pointer obviously results in a segfault.

One could check for null pointers every time but code readability suffers in my opinion while prototyping and debugging with external code could be associated with high efforts.

I would suggest throwing an error naming the parent I’d that is still valid and the invalid child parameter instead returning a null pointer.

While the Adaption in the cpp code is fairly simple, I don’t know the consequences for the SWIG interfaces.
Someone has an idea about it and can estimate if this is feasible?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions