this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

darling-coredump: Be more error-tolerant

If we can't read a particular file, just zero out that memory region and move on; chances are that it's not important. Still report it, however (it might actually be important).

+8 -3
+8 -3
src/hosttools/src/coredump/main.c
··· 345 345 if (!vm_area->filename) { 346 346 // ignore it if starts at 0; that's most likely the __PAGEZERO segment 347 347 if (vm_area->memory_address != 0) { 348 - printf("warning: missing NT_FILE entry for zero-sized memory region\n"); 348 + printf("warning: missing NT_FILE entry for zero-sized memory region 0x%zx-%zx (%lu bytes)\n", vm_area->memory_address, vm_area->memory_address + vm_area->memory_size, vm_area->memory_size); 349 349 } 350 350 vm_area->valid = false; 351 351 } ··· 728 728 free(filename); 729 729 } 730 730 if (fd < 0) { 731 - fprintf(stderr, "Failed to open %s: %d (%s)\n", vma->filename, errno, strerror(errno)); 732 - exit(EXIT_FAILURE); 731 + fprintf(stderr, "Warning: failed to open %s: %d (%s)\n", vma->filename, errno, strerror(errno)); 732 + //exit(EXIT_FAILURE); 733 + // just zero it out 734 + if (!dump_skip(cprm, vma->file_size)) { 735 + exit(EXIT_FAILURE); 736 + } 737 + continue; 733 738 } 734 739 735 740 uintptr_t aligned_offset = round_down_pow2(vma->file_offset, sysconf(_SC_PAGESIZE));