xref: /aosp_15_r20/external/one-true-awk/bugs-fixed/fs-overflow.awk (revision 9a7741de182b2776d7b30d6355f2585c0780a51b)
1*9a7741deSElliott Hughesfunction foo() {
2*9a7741deSElliott Hughes    a = "";
3*9a7741deSElliott Hughes    for (i = 0; i < 10000; i++) {
4*9a7741deSElliott Hughes        a = a "c";
5*9a7741deSElliott Hughes    }
6*9a7741deSElliott Hughes    return a;
7*9a7741deSElliott Hughes}
8*9a7741deSElliott Hughes
9*9a7741deSElliott HughesBEGIN {
10*9a7741deSElliott Hughes    FS = foo();
11*9a7741deSElliott Hughes    $0="foo";
12*9a7741deSElliott Hughes    print $1;
13*9a7741deSElliott Hughes}
14