1
0
Fork 0
mirror of https://github.com/VSadov/Satori.git synced 2025-06-09 17:44:48 +09:00

Fix source_file bug in mono_ppdb_lookup_location_internal (#97392)

document-records affect sequence points that follow in the byte stream,
not points previously read.

When reading the document-record we may already be at the target offset.
Do not update docname local if we have reached the end target already
otherwise the wrong source_file will be reported for the requested offset
This commit is contained in:
Bill Holmes 2024-01-24 10:44:07 -05:00 committed by GitHub
parent 96dd3d1b7f
commit d3583b8360
Signed by: github
GPG key ID: B5690EEEBB952194

View file

@ -409,7 +409,10 @@ mono_ppdb_lookup_location_internal (MonoImage *image, int idx, uint32_t offset,
if (!first && delta_il == 0) {
/* document-record */
docidx = mono_metadata_decode_value (ptr, &ptr);
docname = get_docname (ppdb, image, docidx);
// check the current iloffset to ensure that we do not update docname after the target
// offset has been reached (the updated docname will be for the next sequence point)
if (iloffset < offset)
docname = get_docname (ppdb, image, docidx);
continue;
}
if (!first && iloffset + delta_il > offset)