不敢乱敲了,5个And. 就能让Google Docs崩溃

近日,用户发现Google Docs在输入连续五个大写的And时会崩溃,而其他格式如小写或加点的And则不会触发此问题。此外,类似But、Also等单词也会导致崩溃。该Bug在Firefox中也有体现,但已由谷歌迅速修复。2017年的微信句号Bug也曾引起广泛讨论,这些现象揭示了软件中潜在的奇怪错误源。

Bug千千万,造成Bug的原因也千奇百怪。不久前就有人发现在Google Docs中包含And. And. And. And. And. 会使其崩溃。另外,他还发现这个Bug还只能在and都大写时才会出现,他尝试了"and. and. And. and. And."就没问题。谷歌可能也是“一脸懵”,没有想到这种写法会出现Bug,不过谷歌很快就回复已经修复了这个问题。


图源谷歌
造成Bug的奇葩写法
还有网友说在Firefox 99.0.1中输入 “And. And. And. And. And.”,然后按Enter键,重新加载页面,会也出现错误。(如下图)

有的网友“举一反三”,尝试在Google Docs中输入"But. But. But. But. But.",发现也会出现Bug,不过"Or.Or.Or.Or.Or."似乎不能触发这个Bug。还有网友发现其实不止And和But,输入相同格式的Also, Therefore, Anyway,Who, Why, Besides, However都会出现相同的问题。

相信很多人还记得,2017年微信出现的“句号闪退”Bug,只要是大多数品牌安卓手机甚至是部分苹果手机,一旦微信收到或者发送“双位阿拉伯数字+15个中文句号”,就会崩溃然后直接卡死,只能关闭App然后重启。不过大多数人都以此为乐,当时这个Bug都被广大网友“玩疯”了。

原因为何
这次的五个连续And.导致的Bug,也引发了众多网友的讨论,也有不少网友推测其原因:

众所周知的原因是因为token name会在错误信息中出现在用户面前,所以一些常见的语法错误会产生非常无助的 “Unexpected T_PAAMAYIM_NEKUDOTAYIM” 错误。

这可能只是在一些regex上触发了过多的backtracking。

有网友提到这个错误可能跟语法有关,如果关闭“显示语法建议”,就不会发生崩溃。


原文转自:不敢乱敲了,5个And. 就能让Google Docs崩溃_优快云资讯的博客-优快云博客icon-default.png?t=M4ADhttps://csdnnews.blog.youkuaiyun.com/article/details/124636191?spm=1000.2115.3001.5927

ubuntu@ubuntu:~/Desktop$ afl-fuzz -i input/ -o output/ -N "tcp://192.168.78.136/38412" -P NGAP -D 5000 -q 3 -s 3 -E -K -- ./open5gs/install/bin/open5gs-amfd afl-fuzz 2.56b by <lcamtuf@google.com> [+] You have 2 CPU cores and 2 runnable tasks (utilization: 100%). [*] Checking CPU core loadout... [+] Found a free CPU core, binding to #0. [*] Checking core_pattern... [*] Setting up output directories... [+] Output directory exists but deemed OK to reuse. [*] Deleting old session data... [+] Output dir cleanup successful. [*] Scanning 'input/'... [+] No auto-generated dictionary tokens to reuse. [*] Creating hard links for all input files... [*] Validating target binary... [*] Attempting dry run with 'id:000000,orig:seed-000.bin'... [*] Spinning up the fork server... [+] All right - fork server is up. [-] Oops, the program crashed with one of the test cases provided. There are several possible explanations: - The test case causes known crashes under normal working conditions. If so, please remove it. The fuzzer should be seeded with interesting inputs - but not ones that cause an outright crash. - The current memory limit (50.0 MB) is too low for this program, causing it to die due to OOM when parsing valid files. To fix this, try bumping it up with the -m setting in the command line. If in doubt, try something along the lines of: ( ulimit -Sv $[49 << 10]; /path/to/binary [...] <testcase ) Tip: you can use http://jwilk.net/software/recidivm to quickly estimate the required amount of virtual memory for the binary. Also, if you are using ASAN, see docs/notes_for_asan.txt. - Least likely, there is a horrible bug in the fuzzer. If other options fail, poke <lcamtuf@coredump.cx> for troubleshooting tips. [-] PROGRAM ABORT : Test case 'id:000000,orig:seed-000.bin' results in a crash Location : perform_dry_run(), afl-fuzz.c:3722
06-01
<think>好的,用户在使用AFL进行模糊测试时遇到了程序崩溃的问题,特别是在干运行阶段测试用例id:000000,orig:seed-000.bin导致失败,可能和内存限制有关。需要找出解决方案,比如调整-m参数。首先,我需要回顾AFL的相关文档和引用内容,看看如何处理这类崩溃问题。根据引用[1],当测试用例引起崩溃时,如果设置了skip_crashes或mem_limit,可能需要处理q->cal_failed和cal_failures++。此外,内存限制可能导致崩溃,特别是在macOS上fork()的问题。用户提到调整-m参数,这对应内存限制设置,所以应该检查当前-m的值是否合适。引用[4]提到calibrate_case重新校验测试用例,如果cal_failed小于3次会重新校验,这可能和用户遇到的干运行失败有关。用户的问题可能是测试用例触发了程序崩溃,而AFL默认会记录这些崩溃到crashes目录(引用[2])。但用户可能在干运行时遇到问题,导致无法继续。此时需要确认内存限制是否足够,或者测试用例本身是否有问题。解决方案包括调整-m参数增大内存,或者检查测试用例是否有效。另外,引用[3]显示超时错误,用户的问题虽然是崩溃,但调整内存也可能影响超时。需要综合考虑参数设置。可能的步骤包括:1.增加-m值;2.检查测试用例是否有效;3.使用主从进程分离崩溃;4.使用字典或调整超时参数。同时,需要确保初始测试用例不会导致崩溃,可能需要手动验证种子文件。 用户可能需要具体的命令行示例,比如如何设置-m none来禁用内存限制,或者如何重新校验测试用例。同时,需要提醒用户注意系统差异,如macOS的fork问题,可能需要其他处理方式。总结解决方案的步骤,并生成相关问题帮助用户深入理解。</think>针对AFL-fuzz运行时因测试用例导致程序崩溃的问题,以下是分步解决方案: ### 一、内存限制调整 1. **修改-m参数** 默认内存限制为$50MB$,建议调整为$100MB$或更高: ```bash afl-fuzz -i input/ -o output/ -m 100 -- ./target_program @@ ``` 若问题持续,可尝试禁用内存限制: ```bash afl-fuzz -i input/ -o output/ -m none -- ./target_program @@ ``` 内存不足会导致进程崩溃和干运行失败[^1][^4] ### 二、测试用例验证 2. **手动验证初始种子** 对`id:000000,orig:seed-000.bin`单独测试: ```bash ./target_program input/seed-000.bin ``` 若直接崩溃,说明种子文件需优化或目标程序存在基础缺陷 3. **启用主从进程隔离** 通过`-M`/`-S`分离崩溃实例: ```bash afl-fuzz -i input/ -o output/ -M master -- ./target_program @@ afl-fuzz -i input/ -o output/ -S slave -- ./target_program @@ ``` 崩溃实例会被隔离到crashes目录[^2] ### 三、参数优化组合 4. **组合调整建议** | 参数 | 推荐值 | 作用域 | |-------------|-----------------|--------------------| | -t | 5000+ | 延长超时阈值 | | -m | 100/none | 内存限制 | | -d | 启用 | 确定性检测 | | -x | 字典路径 | 引导输入格式 | ### 四、系统级排查 5. **macOS特殊处理** 使用`AFL_NO_FORKSRV=1`绕过fork服务器问题: ```bash AFL_NO_FORKSRV=1 afl-fuzz -i input/ -o output/ -- ./target_program @@ ``` macOS的fork()实现差异可能导致崩溃[^1]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值