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

Array with size > 8GB generated, invalid on 32-bit targets #183

Open
acoplan-arm opened this issue Jun 19, 2023 · 1 comment
Open

Array with size > 8GB generated, invalid on 32-bit targets #183

acoplan-arm opened this issue Jun 19, 2023 · 1 comment

Comments

@acoplan-arm
Copy link

With the seed 10690367908864332818 (on commit 29a67b2), I see YARPGen producing a very large array (on line 37 in this case):

short arr_16 [24] [24] [24] [24] [24] [24] [24] ;

which is more than 8GB and therefore clearly can't work on 32-bit targets (see e.g. https://godbolt.org/z/Pc9773zxq).

More generally, I think it would be useful to have tuning parameters to limit:

  • The maximum size of an individual array in YARPGen.
  • The total size of all arrays / global variables produced by YARPGen.
@Vsevolod-Livinskij
Copy link
Contributor

Thanks for reporting the issue!

You can limit the maximal number of the array's dimensions in this line. To change the maximal number of elements in the dimension itself, you can change this limit.
You can try to lower the total size of the generated program using this limit. But it is probably a good idea to have a global switch that will limit the total memory consumption

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants