On Tue, 31 Mar 2026 15:06:18 GMT, Matthias Baesken <[email protected]> wrote:

> When building a JVM with -ffunction-sections in the C/C++ compile flags, the 
> gtest os_linux.decoder_get_source_info_valid_vm fails and delivers another 
> result
> 
> 
> [ RUN ] os_linux.decoder_get_source_info_valid_vm
> test/hotspot/gtest/runtime/test_os_linux.cpp:404: Failure
> Expected equality of these values:
>   buf
>     Which is: "test_os_linux.cpp"
>   "jniCheck.hpp"
> 
> [ FAILED ] os_linux.decoder_get_source_info_valid_vm (20 ms)
> 
> 
> So for this compilation mode, it is probably better to avoid the check for 
> this specific header.

One thing I did notice which may be relevant is that the decoder is not using 
libjvm.debuginfo (which doesn't exists for gtest launcher) but it states:

[dwarf] ##### Find filename and line number for offset 0x007bf950 in library 
/scratch/users/daholme/jdk-dev2.git/build/linux-x64-debug-test-linktime-gc/images/test/hotspot/gtest/server/libjvm.so
 #####
[dwarf] Failed to read the .gnu_debuglink header.
[dwarf] Could not read debug info from .gnu_debuglink section
[dwarf] No separate .debuginfo file for library 
/scratch/users/daholme/jdk-dev2.git/build/linux-x64-debug-test-linktime-gc/images/test/hotspot/gtest/server/libjvm.so.
 It already contains the required DWARF sections.
[dwarf] Open DWARF file: 
/scratch/users/daholme/jdk-dev2.git/build/linux-x64-debug-test-linktime-gc/images/test/hotspot/gtest/server/libjvm.so
[dwarf] Built .debug_aranges cache for 
'/scratch/users/daholme/jdk-dev2.git/build/linux-x64-debug-test-linktime-gc/images/test/hotspot/gtest/server/libjvm.so'
 with 113616 entries

So possibly the issue is with those internal DWARF sections. ??

-------------

PR Comment: https://git.openjdk.org/jdk/pull/30516#issuecomment-4211683705

Reply via email to