Change in flashrom[master]: dummyflasher: move struct declaration & probe_variable_size to spi.(h|c)
Attention is currently required from: Namyoon Woo, Thomas Heijligen, Edward O'Callaghan, Anastasia Klimchuk. Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/63831 ) Change subject: dummyflasher: move struct declaration & probe_variable_size to spi.(h|c) ...................................................................... Patch Set 2: (2 comments) Patchset: PS1:
I have a question. I created https://ticket.coreboot. […] We discussed this in a meeting today. I think the best is to temporarily move the code as is into a separate file that re- flects that there is more to do, e.g. `fixme.c`. Then this patch can go in and Thomas doesn't have to wait for some- body to fix the code.
File spi.c: https://review.coreboot.org/c/flashrom/+/63831/comment/2ea3669e_39c783e4 PS1, Line 133: int probe_variable_size(struct flashctx *flash) : { : unsigned int i; : const struct emu_data *emu_data = flash->mst->spi.data;
Also it relies on emu_data, what happens if there is some other data in the context? another struct type?
You are spot-on, this is most likely undefined behavior. Probably what I had in mind when I added this feature to the list of release-blocking issues. I guess I commented about that on Gerrit a while ago (CB:44879). It's a perfect example how merging without proper review and keeping broken code(!) affects the project. -- To view, visit https://review.coreboot.org/c/flashrom/+/63831 To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings Gerrit-Project: flashrom Gerrit-Branch: master Gerrit-Change-Id: Ic93c8b9ba7b9f7ce5fe49326c8de34070ca83a2e Gerrit-Change-Number: 63831 Gerrit-PatchSet: 2 Gerrit-Owner: Thomas Heijligen <src@posteo.de> Gerrit-Reviewer: Anastasia Klimchuk <aklm@chromium.org> Gerrit-Reviewer: Edward O'Callaghan <quasisec@chromium.org> Gerrit-Reviewer: Namyoon Woo <namyoon@google.com> Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org> Gerrit-CC: Nico Huber <nico.h@gmx.de> Gerrit-CC: Paul Menzel <paulepanter@mailbox.org> Gerrit-Attention: Namyoon Woo <namyoon@google.com> Gerrit-Attention: Thomas Heijligen <src@posteo.de> Gerrit-Attention: Edward O'Callaghan <quasisec@chromium.org> Gerrit-Attention: Anastasia Klimchuk <aklm@chromium.org> Gerrit-Comment-Date: Mon, 02 May 2022 20:13:58 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: Nico Huber <nico.h@gmx.de> Comment-In-Reply-To: Thomas Heijligen <src@posteo.de> Comment-In-Reply-To: Anastasia Klimchuk <aklm@chromium.org> Gerrit-MessageType: comment
participants (1)
-
Nico Huber (Code Review)