Skip to content

Fix integer overflow error when building for 386#1541

Merged
jarifibrahim merged 6 commits intodgraph-io:masterfrom
gammazero:build386
Oct 2, 2020
Merged

Fix integer overflow error when building for 386#1541
jarifibrahim merged 6 commits intodgraph-io:masterfrom
gammazero:build386

Conversation

@gammazero
Copy link
Contributor

@gammazero gammazero commented Sep 24, 2020

The untyped const causes conversion to int, for which the value is too large.
Use a typed const instead that is large enough to store value.


This change is Reviewable

The untyped const causes conversion to int, for which the value is too large.  Use a typed const instead that is large enough to store value.
@CLAassistant
Copy link

CLAassistant commented Sep 24, 2020

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@jarifibrahim jarifibrahim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @gammazero 🎉 . This might fix the build but we've seen other cannot allocate memory errors on 386. We can handle those in a separate PR.

@NamanJain8 review please.

@jarifibrahim
Copy link
Contributor

Thanks for helping with the review @damz :)

Copy link
Contributor

@NamanJain8 NamanJain8 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good. Thanks, @gammazero.

@NamanJain8
Copy link
Contributor

Not directly related to the PR itself, @jarifibrahim I was wondering about the use of int64 for ValueLogFileSize and uint32 for maxVlogFileSize. Maybe we need to revisit the types assigned to these.

Co-authored-by: Ibrahim Jarif <jarifibrahim@gmail.com>
@gammazero
Copy link
Contributor Author

The DeepSource and the travis-ci build failures are not related to this PR, and can/should be fixed in a separate PR.

@jarifibrahim jarifibrahim merged commit 68fb85d into dgraph-io:master Oct 2, 2020
@jarifibrahim
Copy link
Contributor

Thanks for fixing this @gammazero

jarifibrahim pushed a commit that referenced this pull request Oct 2, 2020
The untyped const causes conversion to int, for which the value is too large.
Use a typed const instead that is large enough to store value.
@gammazero gammazero deleted the build386 branch October 4, 2020 18:27
@jsoriano
Copy link
Contributor

jsoriano commented Oct 7, 2020

Hi, will this fix be backported to v2.2007?

@jsoriano
Copy link
Contributor

jsoriano commented Oct 7, 2020

Hi, will this fix be backported to v2.2007?

I have created #1558 to fix this issue in v2.2007.

jarifibrahim pushed a commit that referenced this pull request Oct 12, 2020
The untyped const causes conversion to int, for which the value is too large.
Use a typed const instead that is large enough to store value.

Similar to #1541, but for v2.2007 branch.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

6 participants