Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[breakpad] Fix compilation with gcc-13 #26479

Merged
merged 2 commits into from
Feb 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions recipes/breakpad/all/conandata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ patches:
- patch_file: "patches/0001-Use_conans_lss.patch"
- patch_file: "patches/0002-Remove-hardcoded-fpic.patch"
- patch_file: "patches/0003-Fix-gcc11-compilation.patch"
- patch_file: "patches/0004-Fix-gcc13-compilation.patch"
- patch_file: "patches/0005-Apply-upstream-fixes.patch"
10 changes: 10 additions & 0 deletions recipes/breakpad/all/patches/0004-Fix-gcc13-compilation.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
--- a/src/client/linux/handler/minidump_descriptor.h
+++ b/src/client/linux/handler/minidump_descriptor.h
@@ -30,6 +30,7 @@
#ifndef CLIENT_LINUX_HANDLER_MINIDUMP_DESCRIPTOR_H_
#define CLIENT_LINUX_HANDLER_MINIDUMP_DESCRIPTOR_H_

+#include <cstdint>
#include <assert.h>
#include <sys/types.h>

24 changes: 24 additions & 0 deletions recipes/breakpad/all/patches/0005-Apply-upstream-fixes.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
--- a/src/processor/exploitability_linux.cc
+++ b/src/processor/exploitability_linux.cc
@@ -516,18 +516,17 @@
raw_bytes_tmpfile);
FILE* objdump_fp = popen(cmd, "r");
if (!objdump_fp) {
- fclose(objdump_fp);
unlink(raw_bytes_tmpfile);
BPLOG(ERROR) << "Failed to call objdump.";
return false;
}
- if (fread(objdump_output_buffer, 1, buffer_len, objdump_fp) <= 0) {
- fclose(objdump_fp);
+ if (fread(objdump_output_buffer, 1, buffer_len, objdump_fp) != buffer_len) {
+ pclose(objdump_fp);
unlink(raw_bytes_tmpfile);
BPLOG(ERROR) << "Failed to read objdump output.";
return false;
}
- fclose(objdump_fp);
+ pclose(objdump_fp);
unlink(raw_bytes_tmpfile);
return true;
}