Raymond Toy pushed to branch issue-130-file-author-in-c at cmucl / cmucl Commits: 399b8755 by Raymond Toy at 2022-08-31T12:47:39-07:00 Some debugging prints in os_file_author When running CI on linux, there's a SIGABRT: ``` ISSUE.127: 1 assertions passed, 0 failed. buf2 = 0x807e500, size 1024 malloc(): invalid next size (unsorted) | Execution error: | Error in function UNIX::SIGABRT-HANDLER: SIGABRT at #xF7FC6559. | ISSUE.130: 1 assertions passed, 0 failed, and an execution error. ``` But I don't have this problem running on the same linux box. So I have to do this the hard way using CI and prints to figure it out. - - - - - 1 changed file: - src/lisp/os-common.c Changes: ===================================== src/lisp/os-common.c ===================================== @@ -783,13 +783,20 @@ os_file_author(const char *path) } if (result) { + fprintf(stderr, "Allocate %d bytes for author\n", + strlen(result->pw_name + 1)); + author = malloc(strlen(result->pw_name + 1)); if (author) { + fprintf(stderr, "author = %p\n", author); strcpy(author, result->pw_name); } } - free(buf); + fprintf(stderr, "Free buf %p\n", buf); + if (buf) { + free(buf); + } return author; } View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/399b87553f410ad600ab3813... -- View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/399b87553f410ad600ab3813... You're receiving this email because of your account on gitlab.common-lisp.net.
participants (1)
-
Raymond Toy (@rtoy)