Bug 43095 - symbolication offsets are wrong when nops exist
Summary: symbolication offsets are wrong when nops exist
Status: RESOLVED ANSWERED
Alias: None
Product: Runtime
Classification: Mono
Component: JIT ()
Version: unspecified
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Bernhard Urban
URL:
Depends on:
Blocks:
 
Reported: 2016-08-05 16:23 UTC by Marek Safar
Modified: 2017-10-19 19:34 UTC (History)
5 users (show)

Tags: bugpool-archive
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED ANSWERED

Description Marek Safar 2016-08-05 16:23:12 UTC
Consider

    IL_0000:  nop
    IL_0001:  nop
    IL_0002:  nop
    IL_0003:  nop
    IL_0004:  nop
    IL_0005:  ldarg.0
    IL_0006:  newobj     instance void [mscorlib]System.ArgumentNullException::.ctor(string)

Mono will throw and show stack trace like

  at X.ThrowArgumentNullException (System.String argument) [0x00001] in <filename unknown>:0

0x00001 is wrong in this case it should be 0x00006
Comment 1 Bernhard Urban 2017-09-13 08:11:23 UTC
I kinda can reproduce with current master:
https://gist.github.com/lewurm/84d62c939f5ab362e478f6b0bc66a019

The output is:
> Unhandled Exception:
> System.ArgumentNullException: Value cannot be null.
> Parameter name: bla
>   at Bug.ThrowArgumentNullException (System.String a) [0x00005] in <ee4004c0ae004f09a40e7a27dfbad34d>:0
>   at Bug.Main (System.String[] args) [0x00000] in <ee4004c0ae004f09a40e7a27dfbad34d>:0

which is different what the bug report says, but still wrong (should be 0x00006 instead of 0x00005).
Comment 2 Bernhard Urban 2017-09-14 17:20:44 UTC
https://github.com/mono/mono/pull/5579