Skip to content

DPL: avoid crash on nullptr in proxy - #10077

Merged
ktf merged 1 commit into
AliceO2Group:devfrom
ktf:avoid-null-ptr
Oct 17, 2022
Merged

DPL: avoid crash on nullptr in proxy#10077
ktf merged 1 commit into
AliceO2Group:devfrom
ktf:avoid-null-ptr

Conversation

@ktf

@ktf ktf commented Oct 14, 2022

Copy link
Copy Markdown
Member

In principle I do not expect this to happen, but just in case.

In principle I do not expect this to happen, but just in case.
@ktf
ktf requested a review from a team as a code owner October 14, 2022 10:55
@ktf

ktf commented Oct 14, 2022

Copy link
Copy Markdown
Member Author

@dennisklein @rbx is there any case in which a fairmq::Parts would contain a unique ptr set to nullptr?

@rbx

rbx commented Oct 14, 2022

Copy link
Copy Markdown
Contributor

You will not have nullptr after receiving into empty Parts.
Parts is a wrapper around std::vector<MessagePtr>.
But you could of course just put nullptr inside yourself. It would also stay there if you receive into this Parts object, since receive appends to the vector.

We also check for nullptrs inside of parts on sending and error if we find any. But we don't put nullptrs inside ourselves, if I remember right.

So the check is not wrong.

@davidrohr

Copy link
Copy Markdown
Collaborator

this doesn't fix the crash we are seeing (tested in environment id 2b8Hxbczvnd)

@alibuild

Copy link
Copy Markdown
Collaborator

Error while checking build/O2/fullCI for 295c4cb at 2022-10-14 18:27:

## sw/BUILD/o2codechecker-latest/log
100% tests passed, 0 tests failed out of 1

Full log here.

@ktf
ktf merged commit a682e3d into AliceO2Group:dev Oct 17, 2022
@ktf
ktf deleted the avoid-null-ptr branch October 17, 2022 06:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants