Skip to content

pci: replace assert with error handling in enable_dma#38

Open
0xfka wants to merge 1 commit into
emmericp:masterfrom
0xfka:fix/error-handling-enable-dma
Open

pci: replace assert with error handling in enable_dma#38
0xfka wants to merge 1 commit into
emmericp:masterfrom
0xfka:fix/error-handling-enable-dma

Conversation

@0xfka
Copy link
Copy Markdown

@0xfka 0xfka commented Mar 1, 2026

assert() calls abort() on failure, which leaks the file descriptor. It's also disabled with -DNDEBUG flag, causing failures to be silently ignored while I/O operations still execute. Resource: INTERNATIONAL STANDARD ©ISO/IEC ISO/IEC 9899:201x page 186-187, 7.2 Diagnostics <assert.h>".

assert() calls abort() on failure, which leaks the file descriptor.
It's also disabled with -DNDEBUG flag, causing failures to be silently ignored while I/O operations still execute.
Resource: INTERNATIONAL STANDARD ©ISO/IEC ISO/IEC 9899:201x page 186-187, 7.2 Diagnostics <assert.h>"

Signed-off-by: Fatih Karaoğlu <fatih39333@gmail.com>
@0xfka
Copy link
Copy Markdown
Author

0xfka commented Mar 2, 2026

@emmericp I'm not sure this repository is maintained or not, but you may want to check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant