-
Notifications
You must be signed in to change notification settings - Fork 2
Unicode support #1
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
base: master
Are you sure you want to change the base?
Conversation
and also fixed splitting of input lines when FS="", plus tests in T.utf
In case the source string resides in the array that's about to be wiped, copy the string and release its cell immediately. To reproduce: BEGIN { a[1]="a b"; print split(a[1],a),a[1],a[2] } Reported by Todd C. Miller.
The lexer returns a copy of a regular expression's string representation which is then leaked during parsing. Since the only consumer of that copy makes a copy of the copy (makedfa via mkdfa), just return a pointer to the original string. Test with: valgrind --leak-check=full a.out '/123/; /456/' </dev/null Reported by Todd C. Miller.
In every instance, after strnode has extracted the string, the node is leaked. Tests: valgrind --leak-check=full ./a.out '{sub("b", x)}' </dev/null valgrind --leak-check=full ./a.out '{sub("b", r, s)}' </dev/null valgrind --leak-check=full ./a.out '{match(s, "restr")}' </dev/null valgrind --leak-check=full ./a.out '"s1" ~ "s2"' </dev/null
Test: valgrind --leak-check=full ./a.out '{exit}' x=y </dev/null
===============> cat leak.sh #/bin/sh # Monitor awk's memory consumption while repeatedly calling int() # with extra, tempcell-producing expression arguments. There is # nothing special about int(). Most of the other functions in # run.c/bltin() will do. ${1:-./a.out} ' BEGIN { mem = "ps -p $PPID -o rsz=" system(mem) while (++i <= 100000) { int(1+2, 3+4, 5+6, 7+8, 9+0) if (i % 10000 == 0) system(mem) } } ' 2>/dev/null ===============> paste <(./leak.sh ./master.out) <(./leak.sh ./a.out) 2404 2520 4612 2528 6804 2528 9000 2528 11192 2528 13384 2528 15580 2528 17772 2528 19968 2528 22160 2528 24356 2528
===============> cat leak.sh #/bin/sh # Monitor awk's memory consumption while repeatedly calling printf # with extra, tempcell-producing expression arguments. ${1:-./a.out} ' BEGIN { mem = "ps -p $PPID -o rsz=" system(mem) while (++i <= 100000) { printf("%d", 1+2, 3+4, 5+6, 7+8, 9+0) > "/dev/null" if (i % 10000 == 0) system(mem) } } ' 2>/dev/null ===============> paste <(./leak.sh ./master.out) <(./leak.sh ./a.out) 2572 2564 4804 2600 6996 2600 9192 2600 11384 2600 13576 2600 15772 2600 17964 2600 20160 2600 22352 2600 24548 2600
either directly or implicitly because FS is, splitting is done as if the string was in CSV format, as with input.
Update issue templates
Brian Kernighan seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
Revert "fix proto"
name: "表单模板" | ||
description: "填写表单并提交你的 bug" | ||
title: "[Bug]: " | ||
labels: ["bug", "triage"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里 @miykaelxiong 看看
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
等等等等
name: "表单模板" | ||
description: "填写表单并提交你的 bug" | ||
title: "[Bug]: " | ||
labels: ["bug", "triage"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我要看啥? 这个代码不是我写的
Xiongjiamu patch 1
Test BWK's PR