Skip to content

Segmentation Fault #2

@TiagoRodrigues1111

Description

@TiagoRodrigues1111

If the user decides to grab a pointer to a node and then removes that node via a pointer different from that one (for example using remove at index n), then if he tries to access it again, it will result in a segmentation fault. One solution is to prevent the user from accessing any other nodes other than the head. However, if he creates two heads and then removes the head, the other pointer will still give a segmentation fault. It seems to be impossible to solve this issue, without creating an auxiliary array of memory positions that have been deallocated, and checking with them whenever the user tries to access that position with another node pointer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions