Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src\node_buffer.cc:173: Assertion `arg->IsNumber()' failed. #23668

Closed
U-siro opened this issue Oct 15, 2018 · 8 comments
Closed

src\node_buffer.cc:173: Assertion `arg->IsNumber()' failed. #23668

U-siro opened this issue Oct 15, 2018 · 8 comments
Labels
buffer Issues and PRs related to the buffer subsystem. confirmed-bug Issues with confirmed bugs.

Comments

@U-siro
Copy link

U-siro commented Oct 15, 2018

  • Version: v11.0.0-nightly20181007061e09891c

  • Platform:
    image

  • Subsystem:

image

LazerBancho server listening on port 443
LazerBancho NonSecure server listening on port 80
DNS service has started
Connected to MySQL, BeatmapHelper will work now
vortex.data.microsoft.com
ops.dgsrz.com
sending49.165.223.140
Windows PowerShell[23292]: src\node_buffer.cc:173: Assertion `arg->IsNumber()' failed.
 1: 00007FF78D76B1C5
 2: 00007FF78D7443C6
 3: 00007FF78D744491
 4: 00007FF78D72DEE1
 5: 00007FF78D72F069
 6: 00007FF78DB6945E
 7: 00007FF78DB6A980
 8: 00007FF78DB69959
 9: 00007FF78DB6983B
10: 000000B88F550861
PS D:\Data\github\nosuelazer2> node -v
v11.0.0-nightly20181007061e09891c
PS D:\Data\github\nosuelazer2> winver
PS D:\Data\github\nosuelazer2>

I tried to use updns npm module, but this error happens.
But It isn't module bugs, because It works correctly on Node v8.
Also It's native error, so I don't have any idea other than bugs.
If It isn't bug, tell me how to fix it. Thanks!

@bzoz
Copy link
Contributor

bzoz commented Oct 16, 2018

Could you provide a sample code that reproduces that?

@U-siro
Copy link
Author

U-siro commented Oct 16, 2018

Better bet is see updns code. @beoz

module.exports.updnsMiddleware = (app, handlers) => {

    app.on('error', error => {
        console.log(error)
    })
     
    app.on('listening', server => {
        console.log('DNS service has started')
    })

    app.on('message', (domain, send, proxy) => {
        let osuDomains = [
            'android.bugly.qq.com'
        ]
        console.log(domain)
        if(osuDomains.indexOf(domain.toString()) > -1){
            handlers.getIp(null, (osuIp, mirrorIp) => {
                console.log('sending' + osuIp)
                send(osuIp)
            })
        } else {
                proxy('1.1.1.1') // Other traffics
        }
    })
}
let app=updns.createServer(53)
updnsMiddleware(app)

@bzoz
Copy link
Contributor

bzoz commented Oct 18, 2018

Yeah, a repro without using updns would be helpful, since most likely this is an issue with the package itself. The same error can be achieved by misusing Buffer API:

Buffer.alloc(1).copy(Buffer.alloc(1), 'err')

@U-siro
Copy link
Author

U-siro commented Oct 18, 2018

@bzoz Thanks for your comment! However, I think that shouldn't Native error, but a syntax error. :)

@addaleax addaleax added confirmed-bug Issues with confirmed bugs. buffer Issues and PRs related to the buffer subsystem. labels Oct 21, 2018
@U-siro
Copy link
Author

U-siro commented Oct 22, 2018

Thanks @addaleax !!

addaleax added a commit to addaleax/node that referenced this issue Oct 27, 2018
2555cb4 introduced a crash
when a non-number value was passed to `ParseArrayIndex()`.

We do not always have JS typechecking for that in place, though.
This returns back to the previous behavior of coercing values
to integers, which is certainly questionable.

Refs: nodejs#22129
Fixes: nodejs#23668
MylesBorins pushed a commit that referenced this issue Oct 29, 2018
2555cb4 introduced a crash
when a non-number value was passed to `ParseArrayIndex()`.

We do not always have JS typechecking for that in place, though.
This returns back to the previous behavior of coercing values
to integers, which is certainly questionable.

Refs: #22129
Fixes: #23668
@Trott
Copy link
Member

Trott commented Nov 14, 2018

It's unclear to me if this has been fixed or not. Should this remain open?

@cjihrig
Copy link
Contributor

cjihrig commented Nov 14, 2018

It's not fixed. Please do not close it, I'm working on it.

EDIT: On second though, Rafael's comment below seems to indicate that he is working on it.

@refack
Copy link
Contributor

refack commented Nov 14, 2018

There's also #23840.

addaleax added a commit to addaleax/node that referenced this issue Dec 20, 2018
2555cb4 introduced a crash
when a non-number value was passed to `ParseArrayIndex()`.

We do not always have JS typechecking for that in place, though.
This returns back to the previous behavior of coercing values
to integers, which is certainly questionable.

Refs: nodejs#22129
Fixes: nodejs#23668
targos pushed a commit that referenced this issue Jan 1, 2019
2555cb4 introduced a crash
when a non-number value was passed to `ParseArrayIndex()`.

We do not always have JS typechecking for that in place, though.
This returns back to the previous behavior of coercing values
to integers, which is certainly questionable.

Refs: #22129
Fixes: #23668

PR-URL: #25154
Reviewed-By: James M Snell <jasnell@gmail.com>
refack pushed a commit to refack/node that referenced this issue Jan 14, 2019
2555cb4 introduced a crash
when a non-number value was passed to `ParseArrayIndex()`.

We do not always have JS typechecking for that in place, though.
This returns back to the previous behavior of coercing values
to integers, which is certainly questionable.

Refs: nodejs#22129
Fixes: nodejs#23668

PR-URL: nodejs#25154
Reviewed-By: James M Snell <jasnell@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
buffer Issues and PRs related to the buffer subsystem. confirmed-bug Issues with confirmed bugs.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants