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.