Skip to content

Coverity issues.#1056

Merged
xeioex merged 3 commits into
nginx:masterfrom
xeioex:coverity
May 14, 2026
Merged

Coverity issues.#1056
xeioex merged 3 commits into
nginx:masterfrom
xeioex:coverity

Conversation

@xeioex
Copy link
Copy Markdown
Contributor

@xeioex xeioex commented May 14, 2026

No description provided.

xeioex added 3 commits May 13, 2026 17:50
This makes the ownership of the request pointer clearer for readers and
avoids unnecessary confusion for static analyzers.
Found by Coverity (CID 1692699).
Native frames always have an associated function.  Keep the function
lookup in the native-frame branch to make the invariant explicit and to
avoid confusing static analysis.

Found by Coverity (CID 1681309).
Comment thread nginx/ngx_http_js_module.c
@VadimZhestikov
Copy link
Copy Markdown
Contributor

One question for commit 3: Is there a test case covering Error.stack output for bound functions? If not, adding one to the njs test suite would lock in the correct behavior and prevent regression.

Copy link
Copy Markdown
Contributor

@VadimZhestikov VadimZhestikov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 minor notes, otherwise looks good

@github-project-automation github-project-automation Bot moved this from New to In Progress in NGINX OSS Unified Workspace May 14, 2026
@xeioex
Copy link
Copy Markdown
Contributor Author

xeioex commented May 14, 2026

One question for commit 3: Is there a test case covering Error.stack output for bound functions? If not, adding one to the njs test suite would lock in the correct behavior and prevent regression.

https://github.com/nginx/njs/blob/master/src/test/njs_unit_test.c#L22264 covers this.

@xeioex xeioex merged commit 92cc0e6 into nginx:master May 14, 2026
2 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in NGINX OSS Unified Workspace May 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants