You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running Humility on a Hubris archive after the toolchain bump to nightly-2022-11-01 bombs out on HIF initialization:
% humility -a ~/hubris/target/gimlet-b/dist/default/build-gimlet-b.zip hiffy -L
humility: attached via ST-Link V3
humility hiffy failed: function I2cBulkWrite in GOFF 0x000046aa (object 10): missing tag
Looking at the DWARF for Functions in hiffy reveals that... Humility has a point?
The I2cBulkWrite member of the Functions enum just seems to be missing a discriminant value? (Which should clearly be 30.) But that isn't the only bit of weirdness; for contrast, here is the same snippet of the Functions enum from the nightly-2022-07-27 toolchain:
If it needs to be said: the values for DW_AT_discr_value in Functions used to start at 0 -- but now start at 24. (The only variant that doesn't have a discriminant value is I2cBulkWrite; the variants are numbered in ascending order from 24.)
The missing discriminant value is surprising (and may indicate a Rust bug -- to be investigated), but starting at a value other than 0 may be deliberate. The compiler is within its rights to do this, but it breaks Humility's mechanism for discovering HIF functions. (That is, we are getting a much more explicit error by missing DW_AT_discr_value on I2cBulkWrite; were it not for that, we would just be calling the wrong HIF functions!)
For the moment, the fix for this is to not rely on the tag, but raather on the ordering within the DWARF, which seems to honor the programmatic order in the enum.
The text was updated successfully, but these errors were encountered:
Running Humility on a Hubris archive after the toolchain bump to
nightly-2022-11-01
bombs out on HIF initialization:Looking at the DWARF for
Functions
inhiffy
reveals that... Humility has a point?The
I2cBulkWrite
member of theFunctions
enum just seems to be missing a discriminant value? (Which should clearly be 30.) But that isn't the only bit of weirdness; for contrast, here is the same snippet of theFunctions
enum from thenightly-2022-07-27
toolchain:If it needs to be said: the values for
DW_AT_discr_value
inFunctions
used to start at 0 -- but now start at 24. (The only variant that doesn't have a discriminant value isI2cBulkWrite
; the variants are numbered in ascending order from 24.)The missing discriminant value is surprising (and may indicate a Rust bug -- to be investigated), but starting at a value other than 0 may be deliberate. The compiler is within its rights to do this, but it breaks Humility's mechanism for discovering HIF functions. (That is, we are getting a much more explicit error by missing
DW_AT_discr_value
onI2cBulkWrite
; were it not for that, we would just be calling the wrong HIF functions!)For the moment, the fix for this is to not rely on the tag, but raather on the ordering within the DWARF, which seems to honor the programmatic order in the enum.
The text was updated successfully, but these errors were encountered: