https://llvm.org/bugs/show_bug.cgi?id=31458
Bug ID: 31458 Summary: False positive Use-after-free about partclone/srv/btrfs/volumes.c line 170 Product: clang Version: 3.9 Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P Component: Static Analyzer Assignee: kreme...@apple.com Reporter: xiangzha...@gmail.com CC: llvm-bugs@lists.llvm.org Classification: Unclassified Hi clang developers, After reviewed the code https://github.com/Thomas-Tsai/partclone/blob/master/src/btrfs/volumes.c#L164 I argue that it is false positive Use-after-free for Clang Static Analyzer https://pbs.twimg.com/media/C0WBcn6VEAAS1Rp.jpg because device is reassgin! while (!list_empty(&fs_devices->devices)) { --- reassign ----> device = list_entry(fs_devices->devices.next, struct btrfs_device, dev_list); if (device->fd != -1) { fsync(device->fd); if (posix_fadvise(device->fd, 0, 0, POSIX_FADV_DONTNEED)) fprintf(stderr, "Warning, could not drop caches\n"); close(device->fd); device->fd = -1; } device->writeable = 0; list_del(&device->dev_list); /* free the memory */ free(device->name); free(device->label); free(device); } Regards, Leslie Zhai -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs