You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On Linux (and possibly other platforms), when the current directory does not exist, then getcwd() always fails (and gives errno = ENOENT), meaning that the function enters an infinite loop trying to allocate larger and larger buffers until size overflows into a negative number leading to a std::bad_alloc.
// if first char is '/' then it's unix and the dirsep is '/'. otherwise we
// assume it's dos and the dirsep is '\'
char dirsep = buf[0] == '/' ? '/' : '\\';
delete[] buf;
return dirsep;
}
This causes Cbc and many other coin programs to crash on startup since they call CoinFindDirSeparator().
I'm not sure why the directory separator needs to be found in this way (and not just use defines to set it to backslash on Windows and forward slash everywhere else).
The text was updated successfully, but these errors were encountered:
On Linux (and possibly other platforms), when the current directory does not exist, then
getcwd()
always fails (and giveserrno = ENOENT
), meaning that the function enters an infinite loop trying to allocate larger and larger buffers untilsize
overflows into a negative number leading to astd::bad_alloc
.CoinUtils/src/CoinHelperFunctions.hpp
Lines 952 to 969 in ab8cedf
This causes Cbc and many other coin programs to crash on startup since they call
CoinFindDirSeparator()
.I'm not sure why the directory separator needs to be found in this way (and not just use defines to set it to backslash on Windows and forward slash everywhere else).
The text was updated successfully, but these errors were encountered: