Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1600034 - valgrind: ld.so linked with -z separate-code produces valgrind warnings
Summary: valgrind: ld.so linked with -z separate-code produces valgrind warnings
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: valgrind
Version: 28
Hardware: i686
OS: Unspecified
medium
medium
Target Milestone: ---
Assignee: Mark Wielaard
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1600733 (view as bug list)
Depends On:
Blocks: 1623456
TreeView+ depends on / blocked
 
Reported: 2018-07-11 09:18 UTC by Florian Weimer
Modified: 2018-09-21 05:22 UTC (History)
4 users (show)

Fixed In Version: valgrind-3.13.0-21.fc29
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-07-12 22:29:24 UTC


Attachments (Terms of Use)
ld.so (deleted)
2018-07-11 09:18 UTC, Florian Weimer
no flags Details
libc.so.6 (deleted)
2018-07-11 09:19 UTC, Florian Weimer
no flags Details
true (deleted)
2018-07-11 09:19 UTC, Florian Weimer
no flags Details


Links
System ID Priority Status Summary Last Updated
Debian BTS 903389 None None None 2018-07-11 09:28:20 UTC
KDE Software Compilation 395682 None None None 2018-07-11 09:26:16 UTC
Sourceware 23357 None None None 2019-01-25 18:49:46 UTC

Description Florian Weimer 2018-07-11 09:18:46 UTC
Created attachment 1458026 [details]
ld.so

Running the attached ld.so binary with valgrind-3.13.0-13.fc27.i686 gives the following warnings:

==13059== Memcheck, a memory error detector
==13059== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==13059== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info
==13059== Command: ./ld.so --library-path . ./true
==13059== 
==13059== Conditional jump or move depends on uninitialised value(s)
==13059==    at 0x123E3E: ??? (in /tmp/separate-code/ld.so)
==13059== 
==13059== Conditional jump or move depends on uninitialised value(s)
==13059==    at 0x123E4D: ??? (in /tmp/separate-code/ld.so)
==13059== 
==13059== Conditional jump or move depends on uninitialised value(s)
==13059==    at 0x123E5C: ??? (in /tmp/separate-code/ld.so)
==13059== 
==13059== Conditional jump or move depends on uninitialised value(s)
==13059==    at 0x123E6B: ??? (in /tmp/separate-code/ld.so)
==13059== 
==13059== Conditional jump or move depends on uninitialised value(s)
==13059==    at 0x1240AC: ??? (in /tmp/separate-code/ld.so)
==13059== 
==13059== Conditional jump or move depends on uninitialised value(s)
==13059==    at 0x1240B7: ??? (in /tmp/separate-code/ld.so)
==13059== 
==13059== Conditional jump or move depends on uninitialised value(s)
==13059==    at 0x123EE3: ??? (in /tmp/separate-code/ld.so)
==13059== 
==13059== Conditional jump or move depends on uninitialised value(s)
==13059==    at 0x123EEE: ??? (in /tmp/separate-code/ld.so)
==13059== 
==13059== Conditional jump or move depends on uninitialised value(s)
==13059==    at 0x123EF9: ??? (in /tmp/separate-code/ld.so)
==13059== 
==13059== Conditional jump or move depends on uninitialised value(s)
==13059==    at 0x1240F1: ??? (in /tmp/separate-code/ld.so)
==13059== 
==13059== Conditional jump or move depends on uninitialised value(s)
==13059==    at 0x1240F1: ??? (in /tmp/separate-code/ld.so)
==13059==    by 0x111298: ??? (in /tmp/separate-code/ld.so)
==13059== 
==13059== Conditional jump or move depends on uninitialised value(s)
==13059==    at 0x1240AC: ??? (in /tmp/separate-code/ld.so)
==13059==    by 0x111298: ??? (in /tmp/separate-code/ld.so)
==13059== 
==13059== 
==13059== HEAP SUMMARY:
==13059==     in use at exit: 0 bytes in 0 blocks
==13059==   total heap usage: 0 allocs, 0 frees, 0 bytes allocated
==13059== 
==13059== All heap blocks were freed -- no leaks are possible
==13059== 
==13059== For counts of detected and suppressed errors, rerun with: -v
==13059== Use --track-origins=yes to see where uninitialised values come from
==13059== ERROR SUMMARY: 16 errors from 12 contexts (suppressed: 0 from 0)

The matching copy of libc.so.6 is also needed to reproduce this.

Also happens with valgrind-3.13.0-18.fc28.i686 and valgrind-3.13.0-20.fc29.i686.

Comment 1 Florian Weimer 2018-07-11 09:19:28 UTC
Created attachment 1458028 [details]
libc.so.6

Comment 2 Florian Weimer 2018-07-11 09:19:58 UTC
Created attachment 1458029 [details]
true

Comment 3 Florian Weimer 2018-07-11 09:26:17 UTC
$ eu-readelf -l ld.so
Program Headers:
  Type           Offset   VirtAddr   PhysAddr   FileSiz  MemSiz   Flg Align
  LOAD           0x000000 0x00000000 0x00000000 0x000a9c 0x000a9c R   0x1000
  LOAD           0x001000 0x00001000 0x00001000 0x01bbbb 0x01bbbb R E 0x1000
  LOAD           0x01d000 0x0001d000 0x0001d000 0x009c1c 0x009c1c R   0x1000
  LOAD           0x027840 0x00028840 0x00028840 0x000ff8 0x0010c0 RW  0x1000
  DYNAMIC        0x027ef4 0x00028ef4 0x00028ef4 0x0000c8 0x0000c8 RW  0x4
  NOTE           0x000174 0x00000174 0x00000174 0x000024 0x000024 R   0x4
  NOTE           0x026bf4 0x00026bf4 0x00026bf4 0x000028 0x000028 R   0x4
  GNU_EH_FRAME   0x021824 0x00021824 0x00021824 0x000754 0x000754 R   0x4
  GNU_STACK      0x000000 0x00000000 0x00000000 0x000000 0x000000 RW  0x10
  GNU_RELRO      0x027840 0x00028840 0x00028840 0x0007c0 0x0007c0 R   0x1

 Section to Segment mapping:
  Segment Sections...
   00      [RO: .note.gnu.build-id .hash .gnu.hash .dynsym .dynstr .gnu.version .gnu.version_d .rel.dyn .rel.plt]
   01      [RO: .plt .text]
   02      [RO: .rodata .stapsdt.base .eh_frame_hdr .eh_frame .note.gnu.property]
   03      [RELRO: .data.rel.ro .dynamic .got] .data .bss
   04      [RELRO: .dynamic]
   05      [RO: .note.gnu.build-id]
   06      [RO: .note.gnu.property]
   07      [RO: .eh_frame_hdr]
   08     
   09      [RELRO: .data.rel.ro .dynamic .got]

Comment 4 Mark Wielaard 2018-07-12 22:29:24 UTC
A workaround should be in valgrind-3.13.0-21.fc29.

Comment 5 Lukas Slebodnik 2018-07-13 08:22:59 UTC
*** Bug 1600733 has been marked as a duplicate of this bug. ***

Comment 6 Fedora Update System 2018-08-29 19:16:56 UTC
glibc-2.28-9.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2018-7baa4e2d9d

Comment 7 Fedora Update System 2018-08-29 23:14:33 UTC
glibc-2.28-9.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-7baa4e2d9d

Comment 8 Fedora Update System 2018-09-21 05:22:54 UTC
glibc-2.28-9.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.