Repository navigation
fix: validate iterator return value in array/complex64 - #17103
Open
SatyamPandey-07 wants to merge 1 commit into
Open
SatyamPandey-07 wants to merge 1 commit into
SatyamPandey-07 wants to merge 1 commit into
Conversation
Contributor
|
👋 Hi there! 👋 And thank you for opening your first pull request! We will review it shortly. 🏃 💨 Getting Started
Next Steps
Running Tests LocallyYou can use # Run tests for all packages in the math namespace:
make test TESTS_FILTER=".*/@stdlib/math/.*"
# Run benchmarks for a specific package:
make benchmark BENCHMARKS_FILTER=".*/@stdlib/math/base/special/sin/.*"If you haven't heard back from us within two weeks, please ping us by tagging the "reviewers" team in a comment on this PR. If you have any further questions while waiting for a response, please join our Zulip community to chat with project maintainers and other community members. We appreciate your contribution! Documentation Links |
Author
|
@Planeshifter Hi, just bumping this PR in case it slipped through your notifications. Let me know if you need any changes or further testing! |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #17102.
Description
This pull request:
TypeError(Cannot read properties of null/undefined (reading 'next')) inComplex64ArrayandComplex64Array.from(@stdlib/array/complex64) by guardingbuf.nextwith!isObject( buf )after invokingSymbol.iterator.Complex64Arrayconstructor error message so it reports the original input argument (arguments[ 0 ]) instead of the overwrittenSymbol.iteratorreturn value (buf), resolving the existingFIXME.Related Issues
This pull request has the following related issues:
Complex64Arrayreceives an invalid iterable #17102Reference Packages
This pull request followed these packages:
array/bool(lib/node_modules/@stdlib/array/bool/lib/main.js)TypeErrormessage when[Symbol.iterator]()does not return a valid iterator.!isObject( buf )check prior to!isFunction( buf.next )so non-object return values (e.g.,nullorundefined) from[Symbol.iterator]()produce the formattedTypeErrorrather than throwing a property-access error.Questions
No.
Other
Verified locally with Node.js
assertchecks against@stdlib/array/complex64(new Complex64ArrayandComplex64Array.fromwithnulland primitive[Symbol.iterator]()return values, as well as valid iterables). Note that the fulltapetest suite was not run locally becausenode_modules/tapeis not installed in the local checkout.Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
An AI coding assistant (Antigravity) was used to locate the issue, draft the fix in
lib/node_modules/@stdlib/array/complex64/lib/main.js, and run local Node.js verification checks.@stdlib-js/reviewers