similar to: [PATCH] fix UB in bitwriter.c

Displaying 20 results from an estimated 1000 matches similar to: "[PATCH] fix UB in bitwriter.c"

2015 Dec 28
1
[PATCH 3] for bitwriter.c
1) Added assert FLAC__ASSERT((bits == 32) || (val>>bits == 0)) It was inspired by https://sourceforge.net/p/flac/bugs/351/ Such situation should be detected at least. 2) Unnecessary assignments removed: bw->accum = val; bw->bits = 0; (bw->bits is already 0 at this place). 3) Asserts like FLAC__ASSERT(parameter < sizeof(unsigned)*8) were changed to
2015 Dec 16
2
about word size in bitreader/bitwriter
There are preprocessor definitions in bitreader.c and bitwriter.c: /* Things should be fastest when this matches the machine word size */ /* WATCHOUT: if you change this you must also change the following #defines down to SWAP_BE_WORD_TO_HOST below to match */ /* WATCHOUT: there are a few places where the code will not work unless uint32_t is >= 32 bits wide */ #define
2015 Dec 28
1
[PATCH 4] for test_libFLAC/bitwriter.c
1) The definition of FLAC__BitWriter was updated with the current text from /libFLAC/bitwriter.c (the text in comments was changed). And the definition of TOTAL_BITS was made closer to the code from /libFLAC/bitwriter.c. 2) The values for 'words' and 'bits' values now calculated, not just some magic constants. 3) Added FLAC__U64L() for 64-bit constants. It seems that it
2012 Apr 05
1
[PATCH] remove unnecesary typedef in bitwriter.c
--- src/libFLAC/bitwriter.c | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/src/libFLAC/bitwriter.c b/src/libFLAC/bitwriter.c index 651440d..7da4b15 100644 --- a/src/libFLAC/bitwriter.c +++ b/src/libFLAC/bitwriter.c @@ -43,12 +43,11 @@ /* Things should be fastest when this matches the machine word size */ /* WATCHOUT: if you change this
2015 Oct 08
1
Are pointers to FLAC__int32 and int interchangeable?
Erik de Castro Lopo wrote: > Well FLAC__int32 is just a 32 bit integer and on all the platforms/ > architecures/compilers that FLAC supports FLAC__int32 and int are > the same. > > Personally I think the FLAC__xxxx stuff should go, to be replaced with > C standard int32_t, uint32_t, int16_t etc, at least for internal code. > I am slowly doing that when I touch code. > >
2016 Jan 04
0
about word size in bitreader/bitwriter
On Sun, Dec 20, 2015 at 01:30:57PM +0300, lvqcl wrote: > Erik de Castro Lopo wrote: > > > The think in and ideal world we would a: > > > > * Make it work correctly FLAC__BYTES_PER_WORD == 8 and compare the performance > > with FLAC__BYTES_PER_WORD == 4. > > * If there is an statistically measurable performance, keep it, otherwise > > remove the
2015 Oct 07
2
Are pointers to FLAC__int32 and int interchangeable?
There are following functions in bitreader.c: FLAC__bool FLAC__bitreader_read_unary_unsigned(FLAC__BitReader *br, unsigned *val); FLAC__bool FLAC__bitreader_read_rice_signed(FLAC__BitReader *br, int *val, unsigned parameter); FLAC__bool FLAC__bitreader_read_rice_signed_block(FLAC__BitReader *br, int vals[], unsigned nvals, unsigned parameter); * function FLAC__bitreader_read_rice_signed():
2015 Dec 20
2
about word size in bitreader/bitwriter
Erik de Castro Lopo wrote: > The think in and ideal world we would a: > > * Make it work correctly FLAC__BYTES_PER_WORD == 8 and compare the performance > with FLAC__BYTES_PER_WORD == 4. > * If there is an statistically measurable performance, keep it, otherwise > remove the FLAC__BYTES_PER_WORD == 8 code all together. I'll try to do it, but I don't have a deep
2015 Dec 31
1
[PATCH] Support 64-bit brword/bwword
Here is the patch that allows to set FLAC__BYTES_PER_WORD to 8. This is disabled by default though. To test FLAC__BYTES_PER_WORD==8: open src/libFLAC/bitreader.c, src/libFLAC/bitwriter.c, src/test_libFLAC/bitwriter.c and change '#if 1' to '#if 0'. The value of FLAC__BYTES_PER_WORD must be the same in src/libFLAC/bitwriter.c and src/test_libFLAC/bitwriter.c. OTOH, their value in
2013 Apr 07
2
flac 1.3.0pre3 pre-release
Dagobert Michelsen wrote: > There compilation on Solaris 10 Sparc with Sun Studio 12 gives the following compile errors: > > > CC bitreader.lo > > "bitreader.c", line 494: warning: implicit function declaration: MIN > > CC bitwriter.lo > > "bitwriter.c", line 273: reference to static identifier "bitwriter_grow_" in extern
2010 Jun 04
2
[LLVMdev] undefined reference when using llvm-config
I'm trying to start a project based on llvm, but am running into some difficulties. I started with the 'LLVM Project Guide', but got hung up in the complexities of configure.ac. I'm now using llvm-config to provide the linker directives, but this results in undefined references: $ llvm-g++ `$HOME/local/bin/llvm-config --cppflags --ldflags --libs bitwriter` ModuleMaker.cpp
2010 Jun 05
1
[LLVMdev] undefined reference when using llvm-config
On Sat, Jun 5, 2010 at 3:18 AM, Duncan Sands <baldrick at free.fr> wrote: > Hi Tom, > > I'm pretty sure that the LLVMContext constructor is defined in libLLVMCore.a > What is the output of `llvm-config --libs bitwriter`?  Does it include > -lLLVMCore? Hi Duncan, e0082888 at e0082888-laptop:~$ local/bin/llvm-config --libs bitwriter -lLLVMBitWriter -lLLVMCore -lLLVMSupport
2017 Jan 19
4
[PATCH] Fix cppcheck warnings
--- src/libFLAC/bitreader.c | 4 ++-- src/libFLAC/bitwriter.c | 4 ++-- src/plugin_xmms/plugin.c | 2 +- src/share/utf8/charset.c | 1 + src/test_libFLAC++/encoders.cpp | 8 ++++---- src/test_libFLAC/decoders.c | 4 ++-- src/test_libFLAC/encoders.c | 8 ++++---- 7 files changed, 16 insertions(+), 15 deletions(-) diff --git a/src/libFLAC/bitreader.c
2008 Oct 22
2
[LLVMdev] r57974 & r57976 for PR2888
Pending positive confirmation in http://llvm.org/PR2886, I'd recommend that r57974 and r57976 be pulled into the 2.4 release branch and configure regenerated there. Begin forwarded message: > From: Gordon Henriksen <gordonhenriksen at mac.com> > Date: October 22, 2008 08:40:40 EDT > To: llvm-commits at cs.uiuc.edu > Subject: [llvm-commits] [llvm] r57974 -
2014 Feb 12
1
PATCH: typo in bitreader.c / bitwriter.c
Fixes typos in comments in these two files. -------------- next part -------------- A non-text attachment was scrubbed... Name: typo.patch Type: application/octet-stream Size: 1602 bytes Desc: not available Url : http://lists.xiph.org/pipermail/flac-dev/attachments/20140212/f8f231cf/attachment.obj
2010 Jun 05
0
[LLVMdev] undefined reference when using llvm-config
Hi Tom, > I'm trying to start a project based on llvm, but am running into some > difficulties. I started with the 'LLVM Project Guide', but got hung > up in the complexities of configure.ac. I'm now using llvm-config to > provide the linker directives, but this results in undefined > references: > > $ llvm-g++ `$HOME/local/bin/llvm-config --cppflags
2011 Mar 09
1
[LLVMdev] Discrepancies between bin/llvm-config --libs and LLVM_LINK_COMPONENTS in CMake.
Hello. When i run llvm-config --libs jit bitreader bitwriter ipo linker engine i get: -lLLVMX86Disassembler -lLLVMX86AsmParser -lLLVMX86CodeGen -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMMCParser -lLLVMX86AsmPrinter -lLLVMX86Utils -lLLVMX86Info -lLLVMLinker -lLLVMArchive -lLLVMipo -lLLVMBitWriter -lLLVMBitReader -lLLVMJIT -lLLVMExecutionEngine -lLLVMCodeGen -lLLVMScalarOpts -lLLVMInstCombine
2008 Jun 10
6
[LLVMdev] LLVM on OpenBSD
Hi there, I am a student considering a compiler design based dissertation with llvm. I am having problems building llvm on OpenBSD-current. I hope to make a port of llvm for OpenBSD once I have figured out how to build it. Observe: llvm[3]: Compiling Deserialize.cpp for Release build In file included from /home/edd/llvm/llvm-2.3/include/llvm/Bitcode/BitstreamRead er.h:18, from
2013 May 04
5
Bug fix and compatibility patches for 1.3.0pre4
Hi all, I tried 1.3.0pre4 with ICL on Windows and found some issues. Not sure if this is the right place to submit patches, but someone suggested this on the apparently dead SourceForge patch tracker. The first two are quite straight forward: - The ICL patch fixes a typo in bitmath.h and adds FLAC__bitwriter_write_zeroes to the external declarations in bitwriter.c. - The Ogg patch replaces
2015 Dec 29
2
FLAC__BYTES_PER_WORD==8 test results
I wrote a patch that enables FLAC__BYTES_PER_WORD==8 in libFLAC/bitreader.c and libFLAC\bitwriter.c. The tests were done on an Intel Nehalem CPU, and flac was compiled with CGG 4.9.x. Average speed increase for FLAC__BYTES_PER_WORD change from 4 to 8: Decoding speed: ia32 architecture 16-bit .flac: -15% 24-bit .flac: -11% x86-64 architecture 16-bit .flac: