[PR] bolt_rt: getBinaryPath() increase max file path

Summary:
Increase the hard limit from 256 to 4096.
This fixes the 'Assertion failed: failed to open binary path' error I'm seeing.

(cherry picked from FBD31911946)
This commit is contained in:
Marius Wachtler 2021-10-25 20:42:29 +02:00 committed by Maksim Panchenko
parent 1ccc3d500e
commit 46bc197d72
1 changed files with 1 additions and 1 deletions

View File

@ -611,7 +611,7 @@ bool parseAddressRange(const char *Str, uint64_t &StartAddress,
/// /proc/self/map_files
static char *getBinaryPath() {
const uint32_t BufSize = 1024;
const uint32_t NameMax = 256;
const uint32_t NameMax = 4096;
const char DirPath[] = "/proc/self/map_files/";
static char TargetPath[NameMax] = {};
char Buf[BufSize];