initial commit, 4.5 stable
Some checks failed
🔗 GHA / 📊 Static checks (push) Has been cancelled
🔗 GHA / 🤖 Android (push) Has been cancelled
🔗 GHA / 🍏 iOS (push) Has been cancelled
🔗 GHA / 🐧 Linux (push) Has been cancelled
🔗 GHA / 🍎 macOS (push) Has been cancelled
🔗 GHA / 🏁 Windows (push) Has been cancelled
🔗 GHA / 🌐 Web (push) Has been cancelled
Some checks failed
🔗 GHA / 📊 Static checks (push) Has been cancelled
🔗 GHA / 🤖 Android (push) Has been cancelled
🔗 GHA / 🍏 iOS (push) Has been cancelled
🔗 GHA / 🐧 Linux (push) Has been cancelled
🔗 GHA / 🍎 macOS (push) Has been cancelled
🔗 GHA / 🏁 Windows (push) Has been cancelled
🔗 GHA / 🌐 Web (push) Has been cancelled
This commit is contained in:
43
thirdparty/libbacktrace/patches/0001-big-files-support.patch
vendored
Normal file
43
thirdparty/libbacktrace/patches/0001-big-files-support.patch
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
diff --git a/thirdparty/libbacktrace/read.c b/thirdparty/libbacktrace/read.c
|
||||
index 7af66602fd..a7e937667c 100644
|
||||
--- a/thirdparty/libbacktrace/read.c
|
||||
+++ b/thirdparty/libbacktrace/read.c
|
||||
@@ -52,14 +52,7 @@ backtrace_get_view (struct backtrace_state *state, int descriptor,
|
||||
{
|
||||
uint64_t got;
|
||||
ssize_t r;
|
||||
-
|
||||
- if ((uint64_t) (size_t) size != size)
|
||||
- {
|
||||
- error_callback (data, "file size too large", 0);
|
||||
- return 0;
|
||||
- }
|
||||
-
|
||||
- if (lseek (descriptor, offset, SEEK_SET) < 0)
|
||||
+ if (_lseeki64 (descriptor, offset, SEEK_SET) < 0)
|
||||
{
|
||||
error_callback (data, "lseek", errno);
|
||||
return 0;
|
||||
@@ -72,9 +65,13 @@ backtrace_get_view (struct backtrace_state *state, int descriptor,
|
||||
view->len = size;
|
||||
|
||||
got = 0;
|
||||
+ void *ptr = view->base;
|
||||
while (got < size)
|
||||
{
|
||||
- r = read (descriptor, view->base, size - got);
|
||||
+ uint64_t sz = size - got;
|
||||
+ if (sz > INT_MAX)
|
||||
+ sz = INT_MAX;
|
||||
+ r = _read (descriptor, ptr, sz);
|
||||
if (r < 0)
|
||||
{
|
||||
error_callback (data, "read", errno);
|
||||
@@ -84,6 +81,7 @@ backtrace_get_view (struct backtrace_state *state, int descriptor,
|
||||
if (r == 0)
|
||||
break;
|
||||
got += (uint64_t) r;
|
||||
+ ptr += r;
|
||||
}
|
||||
|
||||
if (got < size)
|
Reference in New Issue
Block a user