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

parser can't generate 64 bit integer types #73

Open
devendranaga opened this issue Dec 4, 2015 · 2 comments
Open

parser can't generate 64 bit integer types #73

devendranaga opened this issue Dec 4, 2015 · 2 comments

Comments

@devendranaga
Copy link

For ex: when in uper mode, a value of 43980465111903 gives out -1 when compiled and linked in 32 bit mode (gcc -m32) or on an embedded box.

the problem is with the asn_per_constraints_t structure being treating the lower bound and upper bounds as 'long' data types than 64 bit generic data types in both machine architectures.

@devendranaga
Copy link
Author

To describe more ...

lets consider a simple 42 bit number that is to be generated in the UPER format.

Timestamp ::= INTEGER (0..4398046511103)

When generated with the asn1c on the 32 bit X86 processor, it produces the Timestamp as a long variable. As the long variable is of length 4 bytes on the 32 bits architecture, the encoding always a failure when the integer value goes more than INT_MAX.

@persandstrom
Copy link

I'm working with this in PR #129
Would be appreciated if you could test the changes I have made to see if it will solve your issues.

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