This routine is called when JASSERT triggers. Something failed. DOES (for further diagnosis): cp /proc/self/maps $DMTCP_TMPDIR/proc-maps WITHOUT malloc or spawning process (could be dangerous in fragile state).
| 235 | // DOES (for further diagnosis): cp /proc/self/maps $DMTCP_TMPDIR/proc-maps |
| 236 | // WITHOUT malloc or spawning process (could be dangerous in fragile state). |
| 237 | void |
| 238 | jassert_internal::JAssert::PrintProcMaps() |
| 239 | { |
| 240 | ssize_t count; |
| 241 | char buf[4096] = {0}; |
| 242 | int fd = jalib::open("/proc/self/maps", O_RDONLY, 0); |
| 243 | if (fd == -1) { |
| 244 | return; |
| 245 | } |
| 246 | |
| 247 | Print(" Memory maps: \n"); |
| 248 | |
| 249 | while ((count = jalib::readAll(fd, buf, sizeof(buf) - 1)) > 0) { |
| 250 | Print(buf); |
| 251 | } |
| 252 | |
| 253 | Print("\n"); |
| 254 | |
| 255 | jalib::close(fd); |
| 256 | } |
| 257 | |
| 258 | void |
| 259 | jassert_internal::set_log_file(const dmtcp::string &path) |