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

当前示例在 target 为 x86_64-unknown-linux-musl 时特定情况出现段错误 #6

Open
unknowndevQwQ opened this issue Feb 14, 2025 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@unknowndevQwQ
Copy link
Owner

Describe the bug
直接运行 target/x86_64-unknown-linux-musl/debug/examples/killmyargv 且导致长度大于等于 4476/4499(或者也需要 - 1) 时
且超过一定范围后恢复正常
在环境变量字节数大于 5270 时通过 cargo run --example killmyargv --target x86_64-unknown-linux-musl 运行示例时

To Reproduce
Steps to reproduce the behavior:

  1. run: target/x86_64-unknown-linux-musl/debug/examples/killmyargv $(perl -e 'print "k" x 2048; print "K" x 2369') or cargo run --example killmyargv --target x86_64-unknown-linux-musl
  2. See error

Expected behavior
在 new() 之后执行 argv_addrs() 扔出 InvalidArgvPointer 或者输出正确值

Platform (please complete the following information):

  • OS: Arch linux
  • OS Version: rolling
  • Arch: x86-64
  • lib Version: 0.1.0/1e57761
  • $ env output: 有必要吗?
  • command args: 好像没有?

Additional context
argv_addrs() 如何在 new() 之后仍然取得正确的原始地址?通过某种方式保存 argv 的 Meminfo 结构体以备后续使用?

@unknowndevQwQ unknowndevQwQ added the bug Something isn't working label Feb 14, 2025
@unknowndevQwQ unknowndevQwQ self-assigned this Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant