2681 Commits

Author SHA1 Message Date
openharmony_ci b5906a9ff8 !12 upgrade to v0.188
Merge pull request !12 from zhanghaibo/upgrade
OpenHarmony-v4.1.4-Release OpenHarmony-v4.1.3-Release OpenHarmony-v4.1.2-Release OpenHarmony-v4.0.4-Release OpenHarmony-v4.0.3-Release OpenHarmony-v4.0.2-Release OpenHarmony-v4.0-Beta2 OpenHarmony-v4.0-Release OpenHarmony-v4.0.1-Release OpenHarmony-v4.1-Beta1 OpenHarmony-v4.1-Release OpenHarmony-v4.1.1-Release master-v weekly_20240115-v
2023-05-19 08:34:58 +00:00
openharmony_ci cfb8fe77e7 !13 update oat config
Merge pull request !13 from zhanghaibo/oat-0519
2023-05-19 08:31:47 +00:00
zhanghaibo b923214a6b update oat config
Signed-off-by: zhanghaibo <zhanghaibo0@huawei.com>
Change-Id: I61e5fc54bd6356a8452ea2db1389d017ce5014c6
2023-05-19 11:29:12 +08:00
zhanghaibo 13f82a3d01 adapt v0.188
Signed-off-by: zhanghaibo <zhanghaibo0@huawei.com>
Change-Id: I75e67e6493b0976f67a49bd7c6ad894f6610232d
2023-04-26 09:43:38 +08:00
zhanghaibo e660ab2124 upgrade to v0.188
Signed-off-by: zhanghaibo <zhanghaibo0@huawei.com>
Change-Id: I83c8756f5ce0a464b037bc963cfdce43df82921b
2023-04-25 18:45:37 +08:00
openharmony_ci 0076a8b022 !11 use gnu99 std and fix potential overflow
Merge pull request !11 from zhanghaibo/dev0410
2023-04-10 12:07:01 +00:00
zhanghaibo 94edba6285 use gnu99 std and fix potential overflow
Signed-off-by: zhanghaibo <zhanghaibo0@huawei.com>
Change-Id: Ied6da97755c78f320ad43213077af6e674bb9d24
2023-04-10 18:06:21 +08:00
openharmony_ci a79324bdd2 !10 add symbol link
Merge pull request !10 from zhanghaibo/dev-0306
2023-03-09 03:34:40 +00:00
zhanghaibo ba398ae289 add symbol link
Signed-off-by: zhanghaibo <zhanghaibo0@huawei.com>
Change-Id: Ie300be40b4e3a4b0345de3d7d9791bac4b54d6a6
2023-03-08 16:16:23 +08:00
openharmony_ci 0246498639 !8 update README_OpenHarmony.md
Merge pull request !8 from zhanghaibo/master
2023-03-03 01:30:16 +00:00
zhanghaibo 2b01d42bd6 update README_OpenHarmony.md
Signed-off-by: zhanghaibo <zhanghaibo0@huawei.com>
2023-03-03 09:23:38 +08:00
openharmony_ci f10872e1e4 !7 use external_deps to use elfutils
Merge pull request !7 from zhanghaibo/master
2023-03-01 11:06:10 +00:00
zhanghaibo 5dd00e893e use external_deps to use elfutils
Signed-off-by: zhanghaibo <zhanghaibo0@huawei.com>
2023-03-01 18:40:43 +08:00
openharmony_ci 71dde31e4a !6 fix review issue
Merge pull request !6 from zhanghaibo/master
2023-03-01 07:34:13 +00:00
zhanghaibo 0cd49c8a02 fix review issue
Signed-off-by: zhanghaibo <zhanghaibo0@huawei.com>
2023-03-01 15:24:07 +08:00
openharmony_ci 404abb7a13 !5 update OAT.xml
Merge pull request !5 from zhanghaibo/master
2023-03-01 03:27:57 +00:00
zhanghaibo 7ef09f670b update OAT.xml
Signed-off-by: zhanghaibo <zhanghaibo0@huawei.com>
2023-03-01 11:11:37 +08:00
openharmony_ci 3edadc1938 !4 新增notice
Merge pull request !4 from zhanghaibo/master
2023-02-27 12:39:26 +00:00
zhanghaibo e76630b597 add notice
Signed-off-by: zhanghaibo <zhanghaibo0@huawei.com>
2023-02-27 20:25:02 +08:00
openharmony_ci db14e153ba !3 新增elfutils
Merge pull request !3 from zhanghaibo/master
2023-02-27 01:49:59 +00:00
zhanghaibo 96d3ba00f1 add OAT.xml
Signed-off-by: zhanghaibo <zhanghaibo0@huawei.com>
2023-02-27 09:36:14 +08:00
zhanghaibo bf82c046f1 build elfutils
Signed-off-by: zhanghaibo <zhanghaibo0@huawei.com>
2023-02-25 10:48:30 +08:00
zhanghaibo 4120cecb42 add files generated from source code
Signed-off-by: zhanghaibo <zhanghaibo0@huawei.com>
2023-02-25 10:46:51 +08:00
Mark Wielaard 01747645a4 Prepare for 0.185
Set version to 0.185
Update NEWS and elfutils.spec.in
Regenerate po/*.po files

Signed-off-by: Mark Wielaard <mark@klomp.org>
20230225/sourceware.org/git/elfutils/elfutils-0.185
2021-05-22 15:41:43 +02:00
Frank Ch. Eigler 0b454c7e19 PR27859: correct 404-latch bug in debuginfod client reuse
PR27701 implemented curl handle reuse in debuginfod_client objects,
but with an unexpected bug.  Server responses returning an error
"latched" because the curl_easy handles for error cases weren't all
systematically removed from the curl multi handle.  This prevented
their proper re-addition the next time.

This version of the code simplfies matters by making only the curl
curl_multi handle long-lived.  This turns out to be enough, because it
can maintain a pool of long-lived http/https connections and related
data, and lend them out to short-lived curl_easy handles.  This mode
handles errors or hung downloads even better, because the easy handles
don't undergo complex state transitions between reuse.

A new test case confirms this correction via the federating debuginfod
instance (cleaning caches between subtests to make sure http* is being
used and reused).

Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
2021-05-16 17:51:16 -04:00
Dmitry V. Levin 940b0e7d30 elfcompress: fix exit status in case of an error
Exit status of 255 in case of an error is probably not what elfcompress
users expect, change it to 1.

Reported-by: Vitaly Chikunov <vt@altlinux.org>
Fixes: 92acb57eb0 ("elfcompress: New utility.")
2021-05-12 16:00:00 +00:00
Dmitry V. Levin 806c1f7a0d elfcompress: remove redundant assignment
At the point of "Nothing to do" fnew variable has not been assigned
after initialization, so it does not have to be reset to NULL.

Note that any reset of fnew to NULL has to preceded with free(fnew).

Fixes: ed62996def ("elfcompress: Don't rewrite file if no section data needs to be updated.")
2021-05-12 15:00:00 +00:00
Dmitry V. Levin 43ac25c2de elfcompress: fix exit status regression in case of "Nothing to do"
When elfcompress decides that no section data needs to be updated and
therefore the file does not have to be rewritten, it still has to exit
with a zero status indicating success.

Resolves: https://sourceware.org/bugzilla/show_bug.cgi?id=27856
Fixes: c497478390 ("elfcompress: Replace cleanup() with label")
2021-05-12 15:00:00 +00:00
Martin Liska adc201f819 Come up with startswith function.
New function in system.h that returns true if a string has a given
prefix, false otherwise.  Use it in place of strncmp.

Signed-off-by: Martin Liška <mliska@suse.cz>
2021-05-12 11:56:57 +02:00
Frank Ch. Eigler 857546d176 elfutils.spec: Add procps as a %check BuildRequires:.
On Fedora rawhide, we can no longer just assume ps(1) is there.

Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
2021-05-11 15:57:42 -04:00
Mark Wielaard 97b3f67682 Prepare for 0.184
Set version to 0.184
Update NEWS and elfutils.spec.in
Regenerate po/*.po files

Signed-off-by: Mark Wielaard <mark@klomp.org>
2021-05-10 14:13:53 +02:00
Mark Wielaard 09184fc04f libdw: Document and handle DW_FORM_indirect in __libdw_form_val_compute_len
Update the documentation in __libdw_form_val_compute_len for handling
DW_FORM_indirect and make sure the indirect form isn't DW_FORM_indirect
itself or DW_FORM_implicit_const.

Signed-off-by: Mark Wielaard <mark@klomp.org>
2021-05-06 23:16:10 +02:00
Alice Zhang via Elfutils-devel 5f72c51a7e debuginfod: debuginfod client should cache negative results.
Add debuginfod_config_cache for reading and writing to cache
configuration files, make use of the function within
debuginfod_clean_cache and debuginfod_query_server.

In debuginfod_query_server, create 000-permission file on failed
queries. Before querying each BUILDID, if corresponding 000 file
detected, compare its stat mtime with parameter from
.cache/cache_miss_s. If mtime is fresher, then return ENOENT and
exit; otherwise unlink the 000 file and proceed to a new query.

tests: add test in run-debuginfod-find.sh

test if the 000 file is created on failed query; if querying the
same failed BUILDID, whether the query should proceed without
going through server; set the cache_miss_s to 0 and query the same
buildid, and this time should go through the server.

Signed-off-by: Alice Zhang <alizhang@redhat.com>
2021-05-06 23:04:26 +02:00
Frank Ch. Eigler 92980edc82 PR27571: debuginfod client cache - file permissions
Files in the download cache should be read-only.

Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
2021-05-01 14:15:32 -04:00
Frank Ch. Eigler 95edde45e5 PR26125: debuginfod client cache - rmdir harder
With PR25365, we accidentally lost the ability to rmdir client-cache
directories corresponding to buildids.  Bring this back, with some
attention to a possible race between a client doing cleanup and
another client doing lookups at the same time.

Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
2021-05-01 14:03:01 -04:00
Omar Sandoval d63b26b8d2 libdw: handle DW_FORM_indirect when reading attributes
Whenever we encounter an attribute with DW_FORM_indirect, we need to
read its true form from the DIE data. Then, we can continue normally.
This adds support to the most obvious places: __libdw_find_attr() and
dwarf_getattrs(). There may be more places that need to be updated.

I encountered this when inspecting a file that was processed by our BOLT
tool: https://github.com/facebookincubator/BOLT. This also adds a couple
of test cases using a file generated by that tool.

Signed-off-by: Omar Sandoval <osandov@fb.com>
2021-05-01 16:49:48 +02:00
Frank Ch. Eigler 6c8b68b024 PR27701: debuginfod client: encourage reused debuginfod_client objects
Client objects now carry long-lived curl handles for outgoing
connections.  This makes it more efficient for multiple sequential
queries, because the TCP connections and/or TLS state info are kept
around awhile, avoiding O(100ms) setup latencies.  debuginfod is
adjusted to take advantage of this for federation.  Other clients
should gradually do this too, perhaps including elfutils itself (in
the libdwfl->debuginfod_client hooks).

A large gdb session with 117 debuginfo downloads was observed to run
twice as fast (45s vs. 1m30s wall-clock time), just in nuking this
extra setup latency.  This was tested via a debuginfod intermediary:
it should be even faster once gdb reuses its own debuginfod_client.

Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
2021-04-30 21:26:27 -04:00
Dmitry V. Levin 883f3d0151 po: update XGETTEXT_OPTIONS
Recognize sgettext as a macro which is used for translations.

Flag _, N_, and sgettext with pass-c-format.  The effect of this
specification is that xgettext will propagate format string
requirements for _, N_, and sgettext calls to their first arguments,
and thus mark them as format strings.

Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
2021-04-26 20:00:00 +00:00
Frank Ch. Eigler a81366e011 debuginfod: only update database stats once per groom
On very large servers, each database-stat counting pass can take tens
of minutes (!), and doing it twice per groom pass does not seriously
improve data quality.  Just do it once, after stale data removal &
basic sqlite vacuum.

Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
2021-04-15 07:21:25 -04:00
Frank Ch. Eigler 2a849629a0 debuginfod: Recognize .debug_*-less symtab-laden files as debuginfo
Borrow logic from elfclassify for is_debug_only() for our own
debuginfo identification.

Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
2021-04-15 07:21:24 -04:00
Mark Wielaard 879513aba0 nm: Fix file descriptor leak on dwfl_begin failure.
If dwfl_begin fails we won't use the dwfl_fd descriptor we just dupped.
Make sure to close on dwfl_begin failure to avoid the leak.

Signed-off-by: Mark Wielaard <mark@klomp.org>
2021-04-13 14:45:34 +02:00
Mark Wielaard 1261691acc unstrip: Fix small leak in handle_output_dir_module.
eu-unstrip might leak a string for each module found when using the -d
option. Make sure to free the output_file name when we are done with the
module.

Signed-off-by: Mark Wielaard <mark@klomp.org>
2021-04-13 14:45:34 +02:00
Mark Wielaard b58516a620 ar: Always close newfd in do_oper_insert.
newfd is normally created by mkstemp given the original fd exists.
Otherwise it will created by open from arfname. In the second case
newfd might not get closed. Preventd this by always trying to close
it after errout.

Signed-off-by: Mark Wielaard <mark@klomp.org>
2021-04-13 14:45:34 +02:00
Frank Ch. Eigler a8e925ec75 doc/debuginfod.8: fix wrong parameter name for .deb files in description
One place in the description referred to the parameter for
.deb/.ddeb files as "-D" as opposed to the correct "-U".

Signed-off-by: Andreas Ziegler <andreas.ziegler@fau.de>
2021-04-04 21:57:20 -04:00
Frank Ch. Eigler 69fc2b3a5c debuginfod: Set child thread names via pthread_setname_np()
In order to assist problem diagnosis / monitoring, use this
gnu-flavoured pthread function to set purpose names to the various
child threads debuginfod starts.  libmicrohttpd already sets this for
its threads.

Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
2021-03-30 13:22:43 -04:00
Timm Bäder a51f278371 debuginfod-client: Don't compare a double to a long
Clang warns about this:

../../debuginfod/debuginfod-client.c:899:28: error: implicit conversion from 'long' to 'double' changes value from 9223372036854775807 to 9223372036854775808 [-Werror,-Wimplicit-int-float-conversion]
                pa = (dl > LONG_MAX ? LONG_MAX : (long)dl);
                         ~ ^~~~~~~~
/usr/lib64/clang/10.0.1/include/limits.h:47:19: note: expanded from macro 'LONG_MAX'
                  ^~~~~~~~~~~~
<built-in>:38:22: note: expanded from here
                     ^~~~~~~~~~~~~~~~~~~~

Modified for jakub's observation about LONG_MAX overflow.

Signed-off-by: Timm Bäder <tbaeder@redhat.com>
2021-03-07 13:08:15 -05:00
Piotr Drąg 619aae135a Update Polish translation
https://sourceware.org/bugzilla/show_bug.cgi?id=27450

Signed-off-by: Piotr Drąg <piotrdrag@gmail.com>
2021-03-06 14:25:24 +01:00
Piotr Drąg b7abde7958 Update POTFILES.in
https://sourceware.org/bugzilla/show_bug.cgi?id=27450

Signed-off-by: Piotr Drąg <piotrdrag@gmail.com>
2021-03-06 14:19:55 +01:00
Timm Bäder 1645d4a7e6 build: Check for -Wno-packed-not-aligned support
Clang does not support this warning, so check for compiler support
before using it.

Signed-off-by: Timm Bäder <tbaeder@redhat.com>
2021-03-06 03:14:34 +01:00
Timm Bäder 00d92d0b6a build: Check for -Wtrampolines support
Clang does not support -Wtrampolines, so check if the compiler supports
it before using it.

Signed-off-by: Timm Bäder <tbaeder@redhat.com>
2021-03-06 03:05:51 +01:00