[Bug general/29176] run-backtrace-native-biarch.sh seems to fail on Ubuntu Jammy

2023-03-04 Thread jbglaw--- via Elfutils-devel
https://sourceware.org/bugzilla/show_bug.cgi?id=29176

--- Comment #9 from Jan-Benedict Glaw  ---
Is there already a decision on whether or not the tests should pass when
there's no dbgsym package installed for libc?

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Re: [PATCH v3] strip: keep .ctf section in stripped file

2023-03-04 Thread Guillermo E. Martinez via Elfutils-devel
Hello,

On Fri, Mar 03, 2023 at 12:24:19PM +, Nick Clifton wrote:
> Hi Mark,
> 
> > > > I am mainly wondering why binutils strip already seems to keep ".ctf"
> > > > sections (even without -g).
> 
> > Right. But I am wondering how that mechanism works with binutils strip.
> > Apparently we do something different in eu-strip which makes it
> > necessary to add a --keep-ctf option based on the section name. It
> > would be good if we figured out how/what we can do to keep the
> > different strip utilities in sync.
> 
> I think that the function that does this is "is_strip_section_1" in

That's right, this function decided whether the section will be striped
out by default, if it has set `SEC_DEBUGGING' in BFD section flags then
section is removed by the default.  For `.ctf' this flag is not set
because in `_bfd_elf_make_section_from_shdr' when BFD sections are
building it uses the section's name: ".debug", ".gnu.debuglto_.debug_",
".gnu.linkonce.wi.", ".zdebug", "lines", ".stab", etc, to set
`SEC_DEBUGGING' flag.

> binutils/objcopy.c.  If an input section has the BSF_DEBUGGING flag
> set (an internal flag to he BFD library, but basically it should be
> set for all debug sections, including .ctf sections I think), then
> the basic decision is to keep the section unless -g is used.
> 
> Cheers
>   Nick
> 

Kind regards,
guillermo


[Bug general/29176] run-backtrace-native-biarch.sh seems to fail on Ubuntu Jammy

2023-03-04 Thread mark at klomp dot org via Elfutils-devel
https://sourceware.org/bugzilla/show_bug.cgi?id=29176

--- Comment #10 from Mark Wielaard  ---
(In reply to Jan-Benedict Glaw from comment #9)
> Is there already a decision on whether or not the tests should pass when
> there's no dbgsym package installed for libc?

The test should pass even without the dbgsym package. The unwinder should work
without any extra debuginfo installed. It (now) also fails on debian-testing in
the buildbot:
https://builder.sourceware.org/buildbot/#/builders/elfutils-debian-testing-x86_64

PASS: run-backtrace-native.sh
SKIP: run-backtrace-native-core.sh
FAIL: run-backtrace-native-biarch.sh
SKIP: run-backtrace-native-core-biarch.sh

The skips there are because there are no core files created.

The issue seems to be a testcase issue, where it expects "real" symbol names,
even if it doesn't really matter.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

[PATCH] tests: skip '(null)' symname frames in backtrace tests

2023-03-04 Thread Mark Wielaard
Some setups might have some frames for unknown (null) functions
in the thread backtrace. Skip these frames instead of failing
immediately.

* tests/backtrace.c (callback_verify): Check and skip nulls_seen.

https://sourceware.org/bugzilla/show_bug.cgi?id=29176

Signed-off-by: Mark Wielaard 
---
 tests/backtrace.c | 8 
 1 file changed, 8 insertions(+)

diff --git a/tests/backtrace.c b/tests/backtrace.c
index afc12fb9..5301 100644
--- a/tests/backtrace.c
+++ b/tests/backtrace.c
@@ -90,6 +90,14 @@ callback_verify (pid_t tid, unsigned frameno, Dwarf_Addr pc,
   return;
 }
   Dwfl_Module *mod;
+  /* Skip frames for which there isn't a function name.  */
+  static int nulls_seen = 0;
+  if (symname == NULL)
+{
+  nulls_seen++;
+  return;
+}
+  frameno -= nulls_seen;
   /* See case 4. Special case to help out simple frame pointer unwinders. */
   static bool duplicate_sigusr2 = false;
   if (duplicate_sigusr2)
-- 
2.31.1



[Bug general/29176] run-backtrace-native-biarch.sh seems to fail on Ubuntu Jammy

2023-03-04 Thread mark at klomp dot org via Elfutils-devel
https://sourceware.org/bugzilla/show_bug.cgi?id=29176

--- Comment #11 from Mark Wielaard  ---
Proposed patch:
https://patchwork.sourceware.org/project/elfutils/patch/20230304213534.1448550-1-m...@klomp.org/
Did pass on the elfutils-debian-amd64 builder:
https://builder.sourceware.org/buildbot/#/builders/205/builds/58

-- 
You are receiving this mail because:
You are on the CC list for the bug.

[Bug general/30196] New: [0.189 regression] configure.ac contains Bashisms

2023-03-04 Thread sourceware at mattwhitlock dot name via Elfutils-devel
https://sourceware.org/bugzilla/show_bug.cgi?id=30196

Bug ID: 30196
   Summary: [0.189 regression] configure.ac contains Bashisms
   Product: elfutils
   Version: unspecified
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: general
  Assignee: unassigned at sourceware dot org
  Reporter: sourceware at mattwhitlock dot name
CC: elfutils-devel at sourceware dot org
  Target Milestone: ---

Created attachment 14729
  --> https://sourceware.org/bugzilla/attachment.cgi?id=14729&action=edit
elfutils-0.189-fix-configure-bashisms.patch

Autoconf scripts are supposed to be written in POSIX-compatible shell language.
elfutils commits 0ffe2874e75d48cb88936e119e5284ff2bf664d9 and
3fa98a6f29b0f370e32549ead7eb897c839af980 introduced Bashisms to configure.ac
that cause errors when /bin/sh is not Bash.

Example error when /bin/sh is Dash:

./configure: 8748: test: xyes: unexpected operator


The cause of the error is the use of a non-existent == operator in expressions
passed to the 'test' built-in command. POSIX shell specifies only an = operator
for testing string equality.

Please make the corrections indicated in the attached patch.

-- 
You are receiving this mail because:
You are on the CC list for the bug.