Closed Bug 1074318 Opened 10 years ago Closed 10 years ago

Add debug code to detect closing of invalid file descriptors

Categories

(Firefox OS Graveyard :: GonkIntegration, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1053277

People

(Reporter: dhylands, Unassigned)

Details

CAF runs a customized version of libc, which at least intercepts all of the file descriptor related functions and detects things like double closes of a file descriptor. We don't seem to have code which performs this type of checking, and I think it would good to do this, at least in debug builds. Bug 1073088 would have benefited from this. In that case, the bug was in the original code which had been in the tree for about a month. CAF caught it during their stability tests, and this then causes a mad scramble to find the problem and fix it. If we had the extra checking, then we could have caught it and fixed it a month ago. For B2G, the simplest way to implement this seems to be to shadow all of the file descriptor functions (open/close/dup and friends, etc) in mozglue and track the open status of each file descriptor in private data structures.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.