Registry Mirror
Skip to content

[NativeAOT] ObjectWriter for MacOS should be built and published from the Main branch #87644

Closed

Description

@VSadov

While working on adding TLS support it was discovered that we may be omitting building/publishing ObjectWriter for MacOS.
The libobjwriter.dylib in the nuget that is used by the runtime build is old - from February 6.
That is before merging ObjectWriter into dotnet/llvm-project/main

Also there could be that we accumulated a few issues/bugs in the main branch as a part of the merge or since then.
The binary that is built from main causes dsymutil to OOM which breaks the smoketests build. There are also warnings like:

EXEC : warning : DWARF unit from offset 0x00000000 incl. to offset 0x00133e38 excl. tries to read DIEs at offset 0x00133e38 [/Users/vs/aot01/runtime/src/tests/nativeaot/SmokeTests/UnitTests/UnitTests.csproj] [/Users/vs/aot01/runtime/src/tests/build.proj]
EXEC : warning : DWARF unit from offset 0x00000000 incl. to offset 0x001ce1c2 excl. tries to read DIEs at offset 0x001ce1c2 [/Users/vs/aot01/runtime/src/tests/nativeaot/SmokeTests/Reflection/Reflection_FromUsage.csproj] [/Users/vs/aot01/runtime/src/tests/build.proj]
EXEC : warning : DWARF unit from offset 0x00000000 incl. to offset 0x00129592 excl. tries to read DIEs at offset 0x00129592 [/Users/vs/aot01/runtime/src/tests/nativeaot/SmokeTests/Reflection/Reflection.csproj] [/Users/vs/aot01/runtime/src/tests/build.proj]

This might be happening only on some scenarios and hopefully due to some simple issue, but it prevents using Main branch for further development/testing on MacOS.

Re: dotnet/llvm-project#425

Activity

  1. ghost added
    untriaged
    on Jun 15, 2023
  2. filipnavara commented on Jun 15, 2023

    @filipnavara
    Member

    I plan to look into it.

  3. filipnavara commented on Jun 16, 2023

    @filipnavara
    Member

    I can reproduce it. The DWARF info in the .o file has unbalanced nesting and ends with missing NULL terminator.

  4. filipnavara commented on Jun 16, 2023

    @filipnavara
    Member

    The unbalanced nesting happens here:

    -0x00001e06:   DW_TAG_enumeration_type
    -                DW_AT_name	("Reflection_ReflectionTest_TestAttributeExpressions_MyEnum")
    -                DW_AT_type	(0x000000c0 "int")
    -                DW_AT_byte_size	(0x04)
    -
    -0x00001e10:     NULL
    +0x00001e01:   DW_TAG_enumeration_type
    +                DW_AT_name	("Reflection_ReflectionTest_TestAttributeExpressions_MyEnum")
    +                DW_AT_type	(0x000000bb "int")
    +                DW_AT_byte_size	(0x04)
  5. filipnavara commented on Jun 16, 2023

    @filipnavara
    Member

    I submitted the ObjWriter fix. Someone else will have to fix up DARC once that is merged.

  6. VSadov commented on Jun 19, 2023

    @VSadov
    MemberAuthor

    I just want to confirm the ObjWriter fix. I am able to build it on MacOS and then build/run tests with that ObjWriter.

  7. directhex commented on Jun 19, 2023

    @directhex
    Contributor

    @filipnavara you're a hero. This has been a problem for me.

  8. filipnavara commented on Jun 19, 2023

    @filipnavara
    Member

    Happy to help! Are you going to take care of the DARC changes as part of the LLVM 16 retargeting? Should I open PR against the LLVM 16 branch as well?

  9. directhex commented on Jun 19, 2023

    @directhex
    Contributor

    Yeah, I already made the DARC changes in my LLVM 16 branch, hence running into this

  10. added this to the 8.0.0 milestone on Jun 20, 2023
  11. ghost removed
    untriaged
    on Jun 20, 2023
  12. akoeplinger commented on Jun 22, 2023

    @akoeplinger
    Member

    We might want to make the DARC changes separately so we don't depend on the LLVM 16 work in case that one gets delayed.

  13. agocke commented on Jul 10, 2023

    @agocke
    Member

    This should be done.

  14. ghost locked as resolved and limited conversation to collaborators on Aug 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    • Status
      No status

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions