Moving it back to devel@. It appears to be from this bit of magic in the same file which implements it using a direct reference to register g7.
#elif defined(__sparc__) #include <stdint.h> # define __get_tls() ({ void** __val; register uintptr_t g7 __asm__( "g7" ); __val = (void**) g7; __val; }) I honestly don't know how to tell Coverity or GCC that this is reading a register we trust. On Mon, Aug 21, 2023 at 2:58 PM Chris Johns <chr...@rtems.org> wrote: > Hi > > It is code from somewhere else so sorry I have no idea. > > Chris > > On 21 Aug 2023, at 11:33 pm, Joel Sherrill <j...@rtems.org> wrote: > > > Unitialized variable issue from Coverity in libdl > > ---------- Forwarded message --------- > From: <scan-ad...@coverity.com> > Date: Mon, Aug 21, 2023 at 12:33 AM > Subject: New Defects reported by Coverity Scan for RTEMS > To: <bu...@rtems.org> > > > Hi, > > Please find the latest report on new defect(s) introduced to RTEMS found > with Coverity Scan. > > 1 new defect(s) introduced to RTEMS found with Coverity Scan. > > > New defect(s) Reported-by: Coverity Scan > Showing 1 of 1 defect(s) > > > ** CID 1541150: Memory - illegal accesses (UNINIT) > /cpukit/libdl/rtl-tls.c: 111 in rtems_rtl_tls_get_base() > > > > ________________________________________________________________________________________________________ > *** CID 1541150: Memory - illegal accesses (UNINIT) > /cpukit/libdl/rtl-tls.c: 111 in rtems_rtl_tls_get_base() > 105 #endif > 106 > 107 #if defined(__get_tls) > 108 > 109 void* rtems_rtl_tls_get_base (void) > 110 { > >>> CID 1541150: Memory - illegal accesses (UNINIT) > >>> Using uninitialized value "g7". > 111 return (void*) __get_tls(); > 112 } > 113 > > > > ________________________________________________________________________________________________________ > To view the defects in Coverity Scan visit, > https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypUUzi-2FdSNmuyRB7BEFT8xQ4-2B8hpujh0hTgQljRGId4Dg-3D-3Deeiw_EU3W9teASMK00lBXX9WT4lsogDrkCcNZLvg-2FVxwAXMqJ0gdhGGumG7Gy0Tn5Dw3PQUbh2-2BNMdpxfdtJmNYuHO3QG97iSLio7uY7m4yyhwWxZmfc2p4Yk5m-2B2JQ7-2FNr1n2P8EvOyfDnsHe5-2FCDlZpmVnHhGqVY9mLjZbQG-2FJIE3w3MlGbiKwQw8j63a169WP32Wpts1j8m1uekKxkyIv1KA-3D-3D > > _______________________________________________ > build mailing list > bu...@rtems.org > http://lists.rtems.org/mailman/listinfo/build > >
_______________________________________________ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel