Page MenuHomePhabricator

embryo: fix a integer(cell) overflow problem
ClosedPublic

Authored by id213sin on Aug 3 2020, 3:35 AM.

Details

Summary

The most of functions for embryo based on cell(int) types.
addvariable(), defsymbol(), modstk() and etc.
Because of this, if embryo script has a really big(INT_MAX / 4) stack variable,
integer overflow problem has been happened.
@fix

Test Plan

Put a script in your EDC like the following code.
Build it and try to access the variable.
Or check the writen HEX value by embryo_cc.

script {

// It's size is 1,000,000,000.
// Remember, INT_MAX is 2,147,483,647.
new my_big_variable[1000000000];
...

}

Diff Detail

Repository
rEFL core/efl
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 17174
Build 11443: arc lint + arc unit
id213sin created this revision.Aug 3 2020, 3:35 AM

It seems that this patch has no reviewers specified. If you are unsure who can review your patch, please check this wiki page and see if anyone can be added: https://phab.enlightenment.org/w/maintainers_reviewers/

id213sin requested review of this revision.Aug 3 2020, 3:35 AM
id213sin updated this revision to Diff 30932.Aug 3 2020, 3:47 AM

Update summary.

id213sin edited the summary of this revision. (Show Details)Aug 3 2020, 3:49 AM
id213sin edited the test plan for this revision. (Show Details)
id213sin added reviewers: cedric, woohyun, raster.
id213sin updated this revision to Diff 30933.Aug 3 2020, 4:12 AM

Fix code indentation.

The code indentation is WTH!
There are so many TABs in the rest of code.
Because of TAB in other lines, it looks like HECK.

If anyone accept the patch, please fix the whole file after applying the patch...

eunue accepted this revision.Aug 3 2020, 4:20 AM
This revision is now accepted and ready to land.Aug 3 2020, 4:20 AM
SanghyeonLee accepted this revision.Aug 3 2020, 10:46 PM
This revision was automatically updated to reflect the committed changes.