boludoz / lz4

Automatically exported from code.google.com/p/lz4
Other
0 stars 0 forks source link

it is not compatible on different CPU architecture #139

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. I have a data buffer which is processed by LZ4_compress_limitedOutput on a 
ppc32(big endian) CPU
2.then I move this data into another ppc64(big endian) CPU
3.and try  to decompress them with LZ4_decompress_safe

What is the expected output? What do you see instead?
expected output:get the correct original data
actual output: the data decompressed on ppc64(big endian) is not correct

What version of the product are you using? On what operating system?
r181, linux redhat

Please provide any additional information below.
null

Original issue reported on code.google.com by lewvan85...@gmail.com on 21 Aug 2014 at 3:34

GoogleCodeExporter commented 9 years ago
I'll look into it.

Original comment by yann.col...@gmail.com on 21 Aug 2014 at 3:42

GoogleCodeExporter commented 9 years ago

Original comment by yann.col...@gmail.com on 21 Aug 2014 at 3:43

GoogleCodeExporter commented 9 years ago
There was a problem recently detected within the 64-bits detection macro when 
compiled under some specific compiler on AIX systems. Since AIX is generally 
associated with ppc hardware, maybe it could impact you too ?

The problem was fixed into a recent "dev" branch update :

https://github.com/Cyan4973/lz4/tree/dev

Would you mind testing if it does improve anything for you ?

Regards

Original comment by yann.col...@gmail.com on 21 Aug 2014 at 4:15

GoogleCodeExporter commented 9 years ago
I am trying the dev branch, and my compiler is ppc-unknow-linux-uclibc-gcc 4.4.1
hope it helpful.

Original comment by lewvan85...@gmail.com on 22 Aug 2014 at 6:04

GoogleCodeExporter commented 9 years ago
Not sure to understand.

Do you mean :
- You tested latest "dev" branch on your described system and it failed
or
- You are planning to test latest "dev" branch on your system, and you hope it 
will work ?

Original comment by yann.col...@gmail.com on 22 Aug 2014 at 10:18

GoogleCodeExporter commented 9 years ago
I am testing on this brach:https://github.com/Cyan4973/lz4/tree/dev
and it works well right now.
then i need to integrate this branch into my project.
by the way, I noticed that some macro may have different behavior on diff cpu:
#deffine AARCH(x) (((size_t_S *)(x))->v)
#define STEPSIZE sizeof(size_t)

Original comment by lewvan85...@gmail.com on 23 Aug 2014 at 8:07

GoogleCodeExporter commented 9 years ago
> by the way, I noticed that some macro may have different behavior on diff cpu:

Yes, it's intentional.

I'm glad latest "dev" branch was enough to solve your problem.

Original comment by yann.col...@gmail.com on 23 Aug 2014 at 10:42

GoogleCodeExporter commented 9 years ago
Fixed into r122

Original comment by yann.col...@gmail.com on 28 Aug 2014 at 2:55