profile
viewpoint
Yann Collet Cyan4973 @facebook Menlo Park, USA http://fastcompression.blogspot.fr/ data compression

lz4/lz4 6576

Extremely Fast Compression algorithm

Cyan4973/xxHash 5729

Extremely fast non-cryptographic hash algorithm

Cyan4973/FiniteStateEntropy 1024

New generation entropy codecs : Finite State Entropy and Huff0

Cyan4973/Writing_Safer_C_code 172

Collection of articles on good practices and tools to improve C code quality

Bulat-Ziganshin/FA 123

FreeArc'Next

Cyan4973/RygsDXTc 59

Real-time DXT1/DXT5 texture compressor

Cyan4973/mmc 17

Automatically exported from code.google.com/p/mmc

Cyan4973/smhasher 11

Improved fork of https://code.google.com/p/smhasher/

Cyan4973/Behemoth-Rank-Coding 1

Fast and Strong Burrows Wheeler Model

PullRequestReviewEvent

PR opened Cyan4973/xxHash

fix minor static analyzer warning

when assert() are active the following error condition cannot be met.

fix #629

Reported by @kcgen

+9 -1

0 comment

1 changed file

pr created time in 21 minutes

create barnchCyan4973/xxHash

branch : fix629

created branch time in 22 minutes

PullRequestReviewEvent

pull request commentfacebook/zstd

Improve zstd_opt build speed and size

Great work ! Nice build time savings !

terrelln

comment created time in 26 minutes

push eventCyan4973/xxHash

Yann Collet

commit sha 01897758901d9b41a8cabcc4347d63b6bf1fa597

added m68k emulation tests to GA

view details

Yann Collet

commit sha 80f94bf1cb818390695c3ba8e137f1ad28ac6fa9

Merge pull request #643 from Cyan4973/m68k added m68k emulation tests to GA

view details

push time in 32 minutes

PR merged Cyan4973/xxHash

added m68k emulation tests to GA
+6 -0

0 comment

1 changed file

Cyan4973

pr closed time in 32 minutes

Pull request review commentfacebook/zstd

Avoid Using Deprecated Functions in Deprecated Code

 ***************************************/ #define ZBUFF_STATIC_LINKING_ONLY #include "zbuff.h"+#include "error_private.h"

note : I believe we have decided to use relative #include path in this repository, so that should be ../common/error_private.h

felixhandte

comment created time in an hour

PullRequestReviewEvent
PullRequestReviewEvent
PullRequestReviewEvent

pull request commentfacebook/zstd

[asm] Share portability macros and restrict ASM further

Is there any need to add any CI test to detect issues like #2789 ?

terrelln

comment created time in an hour

PullRequestReviewEvent

push eventfacebook/zstd

Yann Collet

commit sha 30b9db8ae45834fd4b654e6c4e0310cdaa5ab3ae

changed macro name to ZSTD_ALIGNOF for better consistency

view details

push time in an hour

Pull request review commentfacebook/zstd

Avoid Using Deprecated Functions in Deprecated Code

 size_t ZBUFF_compressInit_advanced(ZBUFF_CCtx* zbc,                                    const void* dict, size_t dictSize,                                    ZSTD_parameters params, unsigned long long pledgedSrcSize) {+    size_t ret;     if (pledgedSrcSize==0) pledgedSrcSize = ZSTD_CONTENTSIZE_UNKNOWN;  /* preserve "0 == unknown" behavior */-    return ZSTD_initCStream_advanced(zbc, dict, dictSize, params, pledgedSrcSize);+    ret = ZSTD_CCtx_reset(zbc, ZSTD_reset_session_only);+    ret = ZSTD_isError(ret) ? ret : ZSTD_CCtx_setPledgedSrcSize(zbc, pledgedSrcSize);

It's reasonable to depend on lib/common for this code

felixhandte

comment created time in an hour

PullRequestReviewEvent

Pull request review commentfacebook/zstd

Avoid Using Deprecated Functions in Deprecated Code

 size_t ZBUFF_compressInit_advanced(ZBUFF_CCtx* zbc,                                    const void* dict, size_t dictSize,                                    ZSTD_parameters params, unsigned long long pledgedSrcSize) {+    size_t ret;     if (pledgedSrcSize==0) pledgedSrcSize = ZSTD_CONTENTSIZE_UNKNOWN;  /* preserve "0 == unknown" behavior */-    return ZSTD_initCStream_advanced(zbc, dict, dictSize, params, pledgedSrcSize);+    ret = ZSTD_CCtx_reset(zbc, ZSTD_reset_session_only);+    ret = ZSTD_isError(ret) ? ret : ZSTD_CCtx_setPledgedSrcSize(zbc, pledgedSrcSize);

minor : a macro would be helpful here to reduce repetition

felixhandte

comment created time in 2 hours

PullRequestReviewEvent

PR opened Cyan4973/xxHash

added m68k emulation tests to GA
+6 -0

0 comment

1 changed file

pr created time in 3 hours

create barnchCyan4973/xxHash

branch : m68k

created branch time in 3 hours

push eventCyan4973/xxHash

Yann Collet

commit sha 49b2d47884dcb889dca6e280223f232704ff7de3

fix #627 attempt to fix a minor PVS Studio warning which claims that passing a value by copy is worse for performance than a value by reference, which, given that the value is 16 bytes long, is already silly just from the start, but is even more so in this case as the function is short designed to be inlined by the compiler anyway. Made the inlining objective more explicit, in an attempt to silence the static analyzer objection. This is a blind fix, as I don't have PVS Studio to check.

view details

Yann Collet

commit sha c4716aed7042f263d48a84aa3254a9370900631e

Merge pull request #639 from Cyan4973/fix627 fix #627

view details

push time in 3 hours

PR merged Cyan4973/xxHash

fix #627

attempt to fix a minor PVS Studio warning which claims that passing a value by copy is worse for performance than a value by reference. Given that the value is 16 bytes long, the claim is quite debatable, if not already silly from the start, but it is even more so in this case because the function is very short and designed to be inlined by the compiler anyway.

Made the inlining objective more explicit, in an attempt to silence the static analyzer objection.

This is a blind fix, as I don't have PVS Studio to check.

fix #627 (hopefully)

+1 -1

2 comments

1 changed file

Cyan4973

pr closed time in 3 hours

push eventCyan4973/xxHash

Yann Collet

commit sha b8ad12a60ed8921c34ef47b22e06c777f4aebc40

fix #625 PVS Studio static analyzer doesn't like that the structure is not entirely initialized. This was supposed to allow, in some future, to reduce the size of the state, while minimizing impact with library's installed based (in case of version mismatch). This is way too complex and risky for such a tiny benefit. So revert to the classical "init everything" method, which should please PVS Studio. The last member will remain "reserved" and unused. Who knows, maybe in some future, it may be of some use, for some purpose yet to determine.

view details

Yann Collet

commit sha 0caf2e8574544131c06812c5efe6b0b67dd295f0

Merge pull request #638 from Cyan4973/fix625 fix #625

view details

push time in 3 hours

PR merged Cyan4973/xxHash

fix #625

PVS Studio static analyzer doesn't like that the structure is not entirely initialized. This was intentional, and supposed to allow, in some future, to reduce the size of the state, while minimizing impact with library's installed based (in case of version mismatch).

This is way too complex and risky for such a tiny benefit. So revert to the classical "init everything" method, which should please PVS Studio. The last member will remain "reserved" and unused. Who knows, maybe in some future, it may be of some use, for some purpose yet to determine.

Fix #625, reported by @kcgen .

+14 -18

2 comments

1 changed file

Cyan4973

pr closed time in 3 hours

issue closedCyan4973/xxHash

0.8.1: PVS Studio flagged buffer underflows in the state reset functions

2021-11-30_10-07 2021-11-30_10-08

My guess is it's detecting the use of the reserved portion, which if coming from malloc (for the memory behind the incoming state pointer), might contain garbage.

closed time in 3 hours

kcgen

push eventfacebook/zstd

Yann Collet

commit sha 1d025d871bf0891aceac437685f33cd6e638f4c7

bound alignment backup to sizeof(void*)

view details

push time in 3 hours

PullRequestReviewEvent

push eventfacebook/zstd

Yann Collet

commit sha 80a13fd64555e2be571a0436a3fae0dd867ce626

move the alignment macro to compiler.h because mem.h is dropped in the Linux kernel. Changed macro definition order (gcc/clang/msvc before c11) due to a limitation in the kernel source builder. Changed the backup to sizeof(), reverting to previous behavior when no support of alignof() is detected.

view details

push time in 3 hours

PR merged facebook/zstd

Makefile: fix build for mingw CLA Signed

Add ${EXT} to required places to make install succeed for mingw build.

+3 -3

2 comments

1 changed file

sapiippo

pr closed time in 3 hours

more