Comments (13)
[deleted comment]
from lz4.
here is the patch:
//****************************
// Private functions
//****************************
#if LZ4_ARCH64
#if defined(_MSC_VER) && !defined(LZ4_FORCE_SW_BITCOUNT)
# if defined(LZ4_BIG_ENDIAN)
# pragma intrinsic(_BitScanReverse64)
# else
# pragma intrinsic(_BitScanForward64)
# endif
#endif
// ...
#else
#if defined(_MSC_VER) && !defined(LZ4_FORCE_SW_BITCOUNT)
# if defined(LZ4_BIG_ENDIAN)
# pragma intrinsic(_BitScanReverse)
# else
# pragma intrinsic(_BitScanForward)
# endif
#endif
Original comment by [email protected]
on 12 Apr 2012 at 9:53
from lz4.
OK, I will look into it. Although i haven't VC2005 available around...
Original comment by [email protected]
on 12 Apr 2012 at 7:05
- Changed state: Accepted
from lz4.
I believe this issue not only appeared in version 8 (2005).
Original comment by [email protected]
on 12 Apr 2012 at 7:09
from lz4.
Please find in attached file a proposed correction.
Would you mind checking if it works for you ?
Note that the correction only relates to issue 16 (VS2005 linking error on
Debug).
Regards
Original comment by [email protected]
on 12 Apr 2012 at 7:16
Attachments:
from lz4.
You have only fixed it for 32bit platform?
Original comment by [email protected]
on 13 Apr 2012 at 7:47
from lz4.
> I believe this issue not only appeared in version 8 (2005).
Apparently, the issue is not present within Visual 2008 nor 2010 (I could test
these versions). I guess it is specific to Visual 2005 and maybe earlier
versions.
> You have only fixed it for 32bit platform?
Yes.
I am aware of no situation using VS2005 to build 64 bits binaries.
I understand that in theory it could happen, but i also deeply believe that it
is detrimental to bloat the generic code too much, so there is a trade-off to
select. Covering too specific corner cases should be left to forks.
Even the current correction seems a bit too focused, since it does not target
the Microsoft family of compilers, but only the specific 2005 version. But it's
okay because it is only 2 lines and produces no extra-case.
Original comment by [email protected]
on 13 Apr 2012 at 11:20
from lz4.
I am using VS2005 to build 64 bits binaries :-)
But I also agree that keeping the code simple and clean is very important.
Original comment by [email protected]
on 13 Apr 2012 at 11:29
from lz4.
OK, i'm back after a much needed break.
Please find in attached file a proposed modification of LZ4 covering both the
32 bits and 64 bits situations.
The patch is now 7 lines.
It is not a lot more than 2 lines, but it's no longer invisible.
And I'm somewhat puzzled by the pending benefit.
If i do understand correctly, it corrects a problem of linking stage within
Visual Studio 2005 (not later versions), specifically when linking Debug binary
(not the Release one).
This problem, by the way, is solved by the "/Oi" option, which apparently
should have been automatically selected by MS Visual to begin with.
It seems to me that it is a quite narrow corner case.
So is it worse 7 lines in the main source trunk ?
Or should it be left to a dedicated fork ?
Your comments are always welcomed
Original comment by [email protected]
on 3 May 2012 at 1:57
Attachments:
from lz4.
[deleted comment]
from lz4.
The 7 lines version is ok :-)
I think adding '/Oi' argument to debug version is not a good solution, because
it could be a obstruction for the debugging process (e.g.: step over and step
into actions will not work correctly).
Original comment by [email protected]
on 3 May 2012 at 2:19
from lz4.
OK,
although this is to support a very specific configuration,
since the change is fairly well located in a single place
i will update LZ4 with the 7-lines patch.
Original comment by [email protected]
on 7 May 2012 at 10:58
from lz4.
Corrected into r63
Original comment by [email protected]
on 7 May 2012 at 11:11
- Changed state: Fixed
from lz4.
Related Issues (20)
- Clang compiler warnings HOT 6
- LZ4F_compressBound() using null PreferencesPtr HOT 3
- lz4io license HOT 6
- Commandline lz4 stops when decompressing a concatenated lz4 file representing an empty file HOT 4
- Kernel wont boot with CONFIG_DYNAMIC_DEBUG=y HOT 2
- Bad alignment detection & setting on Sparc Solaris HOT 2
- lz4 r124 breaks ABI without bumping soname HOT 22
- Do not call sudo in Makefile HOT 3
- LZ4 HC r126 crashes when compiled with GCC 4.9 on highest optimization settings HOT 1
- lz4frame should correctly handle skipped frames HOT 4
- LZ4 cli invocation should match other compressors for non-option arguments HOT 14
- sudo make install does not cp files to /usr/local HOT 6
- lz4 auto-decompress does not work HOT 3
- Force should pass thru bytes unchanged HOT 5
- lz4 cli should support sparse file HOT 22
- decompression same file on different platforms HOT 3
- Static code analysis warnings HOT 10
- Google Code will close HOT 3
- [Query]Can LZo algorithm optimized for ARM NEON (SIMD instructions). HOT 3
- Potential Size Extension Problem in LZ4F_readLE64 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lz4.