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

[Advanced Calculator]: Some Bugs #55

Closed
Airero opened this issue Jul 21, 2022 · 6 comments
Closed

[Advanced Calculator]: Some Bugs #55

Airero opened this issue Jul 21, 2022 · 6 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@Airero
Copy link

Airero commented Jul 21, 2022

一些小问题

(1) 运算 -> 复杂运算,如=2**2**2**2**2**2**2**2**2**2 or !!calc 2**2**2**2**2**2**2**2**2**2 的指令大量执行会阻塞线程

(2) 合法性校验 ->非无符号整型,如!!calc item -1 or !!calc item 3.3

(3) 异常抛出 ->TypeError,如!!calc item [] or !!calc item chr(32)

@AnzhiZhang
Copy link
Owner

AnzhiZhang commented Jul 21, 2022

(1) 运算 -> 复杂运算,如 =2**2**2**2**2**2**2**2**2**2 or !!calc 2**2**2**2**2**2**2**2**2**2 的指令大量执行会阻塞线程

性能不足,不是插件问题

(2) 合法性校验 ->非无符号整型,如!!calc item -1 or !!calc item 3.3

预期行为

(3) 异常抛出 ->TypeError,如!!calc item [] or !!calc item chr(32)

已在 #54 中修复

@AnzhiZhang AnzhiZhang closed this as not planned Won't fix, can't repro, duplicate, stale Jul 21, 2022
@Airero
Copy link
Author

Airero commented Jul 21, 2022

还有!!calc item 2==2呢

@Airero
Copy link
Author

Airero commented Jul 21, 2022

(1) 运算 -> 复杂运算,如 =2**2**2**2**2**2**2**2**2**2 or !!calc 2**2**2**2**2**2**2**2**2**2 的指令大量执行会阻塞线程

性能不足,不是插件问题

(2) 合法性校验 ->非无符号整型,如!!calc item -1 or !!calc item 3.3

预期行为

(3) 异常抛出 ->TypeError,如!!calc item [] or !!calc item chr(32)

已在 #54 中修复

不好意思我表达错了,(1)应该要限制一下。而且(2)中!!calc item -1不是不应该被执行吗
image

@AnzhiZhang
Copy link
Owner

1 无法实现限制,不能预先判断计算消耗的性能

2 不是正常是使用方式,不做限制,使用后果不保证运算准确性

@Airero
Copy link
Author

Airero commented Jul 21, 2022

1 无法实现限制,不能预先判断计算消耗的性能

2 不是正常是使用方式,不做限制,使用后果不保证运算准确性

好吧

@AnzhiZhang
Copy link
Owner

第一个问题目前最新版已修复

@AnzhiZhang AnzhiZhang added bug Something isn't working enhancement New feature or request labels Feb 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants