Version
v26.3.0
Platform
Subsystem
sqlite
What steps will reproduce the bug?
const { DatabaseSync } = require('node:sqlite');
const db = new DatabaseSync(':memory:');
console.log(db.createTagStore(-1).capacity); // 18446744073709552000 (overflow)
console.log(db.createTagStore(NaN).capacity); // garbage value
console.log(db.createTagStore(1.5).capacity); // accepts float silently
How often does it reproduce? Is there a required condition?
everytime!
What is the expected behavior? Why is that the expected behavior?
maxSize is documented as {integer} and represents a cache size — negative values, NaN, and floats should throw ERR_INVALID_ARG_TYPE or ERR_OUT_OF_RANGE.
What do you see instead?
Invalid values are silently accepted, causing integer overflow and garbage capacity values.
Additional information
No response
Version
v26.3.0
Platform
Subsystem
sqlite
What steps will reproduce the bug?
How often does it reproduce? Is there a required condition?
everytime!
What is the expected behavior? Why is that the expected behavior?
maxSizeis documented as{integer}and represents a cache size — negative values, NaN, and floats should throwERR_INVALID_ARG_TYPEorERR_OUT_OF_RANGE.What do you see instead?
Invalid values are silently accepted, causing integer overflow and garbage capacity values.
Additional information
No response