Richard W.M. Jones [Tue, 21 Jul 2015 14:59:00 +0000 (15:59 +0100)]
configure: Don't test for camlp4of.opt, test for camlp4of.
This patch isn't complete since we should really choose the best
(either camlp4of or camlp4of.opt) and then use it in the Makefile.
But at least it stops the package from breaking on bytecode-only
architectures.
Richard W.M. Jones [Thu, 31 Jul 2014 11:10:10 +0000 (12:10 +0100)]
Add .gitignore file.
Bernhard Schommer [Thu, 31 Jul 2014 11:05:38 +0000 (12:05 +0100)]
Compilation fails due to void pointer arithmetic (issue 24).
Richard W.M. Jones [Wed, 30 Jul 2014 20:02:02 +0000 (20:02 +0000)]
Stop using allocation trick in fastpath functions (OCaml 4.02).
In OCaml 4.02, there is a new compiler optimization which means we can
no longer rely on the trick of passing in a newly allocated `zero'
(ie. Int32.zero or Int64.zero) to our fastpath noalloc functions.
Instead we have to turn these into regular functions, which means they
may be a bit slower.
Richard W.M. Jones [Wed, 30 Jul 2014 19:39:53 +0000 (19:39 +0000)]
Add signed int extract and construction functions, and test.
Written by: Matthieu Dubuget
https://code.google.com/p/bitstring/issues/detail?id=10
Richard W.M. Jones [Sat, 14 Sep 2013 11:59:50 +0000 (11:59 +0000)]
Enable debugging for ocamlopt-generated code.
Richard W.M. Jones [Thu, 18 Jul 2013 20:29:07 +0000 (20:29 +0000)]
Allow bitstring to be compiled with Core.
(Patch by Andreas Garnæs)
Richard W.M. Jones [Tue, 14 May 2013 16:01:53 +0000 (16:01 +0000)]
Version 2.0.4.
Richard W.M. Jones [Tue, 14 May 2013 15:56:07 +0000 (15:56 +0000)]
Add functions: is_zeroes_bitstring, is_ones_bitstring.
Richard W.M. Jones [Fri, 10 Aug 2012 11:52:44 +0000 (11:52 +0000)]
Stable OCaml dependencies.
Richard W.M. Jones [Fri, 10 Aug 2012 11:44:18 +0000 (11:44 +0000)]
Fix memory leaks and alignment issues (thanks rixed at happyleptic.org)
First one: a huge memory leak when bitmatching on int64. The reason is
that on my arch (MIPS), which is a ARCH_ALIGN_INT64 arch, the function
to extract int64 calls caml_copy_int64 but you are not supposed to do
that since all functions are declared noalloc (should segfault but
merely leaks memory on my program). See this message of Xavier for
more explanations as to why it's a bug:
http://caml.inria.fr/pub/ml-archives/caml-list/2010/03/
2e386c384c04f4a424acc44a1
fae3abd.en.html
So the easy fix would be to remove the noallocs for the int64 functions,
but there is a better way around the issue: instead of assigning a int64
onto a possibly non 8 bytes aligned memory location we can merely memcpy
the value in there, thus avoiding the extra allocation and the
caml_c_call wrapper.
While looking at this I stumbled upon the other bug: bitstring_c.c
extract values by assigning a casted rvalue into a properly
stack-allocated local variable. You cannot do that, this is undefined
behavior since it assumes that unaligned reads are permitted. Again, on
my MIPS such unaligned access are (by default) diverted to an exception
handler which (slowly!) fix them on the fly (one can see the errorcount in
/proc/kernel/debug/mips/unaligned_instructions), but on other archs it
could as well result in a sigbus. I believe this would be a problem on
ARM as well. Again, memcpy comes to the rescue.
The attached patch fixes both issues.
Richard W.M. Jones [Fri, 20 Jul 2012 08:06:08 +0000 (08:06 +0000)]
META: Add -parser and -printer options.
Richard W.M. Jones [Wed, 4 Apr 2012 09:40:42 +0000 (09:40 +0000)]
takebits/dropbits: check that n >= 0
http://code.google.com/p/bitstring/issues/detail?id=18
Richard W.M. Jones [Fri, 30 Mar 2012 12:49:30 +0000 (12:49 +0000)]
Permissive subbitstring allows a segmentation fault (issue #16).
Fix by mrvn.
Richard W.M. Jones [Tue, 17 Jan 2012 13:24:46 +0000 (13:24 +0000)]
Update MANIFEST.
Richard W.M. Jones [Tue, 17 Jan 2012 13:21:57 +0000 (13:21 +0000)]
Version 2.0.3.
Richard W.M. Jones [Tue, 17 Jan 2012 13:20:53 +0000 (13:20 +0000)]
Fix concatenation of non-aligned bitstrings (thanks Phil Tomson).
This commit includes a regression test.
Richard W.M. Jones [Tue, 17 Jan 2012 13:02:18 +0000 (13:02 +0000)]
In a '{...} as foo' binding, save the original bitstring offset and
length as 'foo'. Before we were saving the running offset and length.
This commit also adds a regression test. (Bug found by Matej Kosik).
Richard W.M. Jones [Tue, 17 Jan 2012 12:44:36 +0000 (12:44 +0000)]
Add 'make check' as a synonym for 'make test'.
Richard W.M. Jones [Tue, 17 Jan 2012 12:39:09 +0000 (12:39 +0000)]
Rename test programs so the name is a valid OCaml module name.
Richard W.M. Jones [Fri, 5 Feb 2010 14:01:53 +0000 (14:01 +0000)]
TODO: Added more suggested features based on feedback from hivex.
Richard W.M. Jones [Mon, 11 Jan 2010 13:05:01 +0000 (13:05 +0000)]
Fix issue 5: Bitstring cannot be used with other syntax extensions when using ocamlfind
Richard W.M. Jones [Fri, 8 Jan 2010 15:13:13 +0000 (15:13 +0000)]
Version 2.0.2 for release.
Richard W.M. Jones [Fri, 8 Jan 2010 15:10:04 +0000 (15:10 +0000)]
Fix handling of OCAML_PKG_* macros for new OCaml autoconf.
Richard W.M. Jones [Fri, 8 Jan 2010 14:44:42 +0000 (14:44 +0000)]
Version 2.0.1 for release.
Richard W.M. Jones [Fri, 8 Jan 2010 14:43:45 +0000 (14:43 +0000)]
CIL example: <linux/fs.h> is now required for <linux/ext3_fs.h>
Richard W.M. Jones [Fri, 8 Jan 2010 14:43:07 +0000 (14:43 +0000)]
CIL: Include dynlink for OCaml 3.11.
Richard W.M. Jones [Fri, 8 Jan 2010 14:28:17 +0000 (14:28 +0000)]
Fix empty case for OCaml 3.11 and above.
Richard W.M. Jones [Fri, 8 Jan 2010 14:27:38 +0000 (14:27 +0000)]
Fix handling of dynlink in OCaml 3.11 and above.
Richard W.M. Jones [Fri, 8 Jan 2010 14:26:23 +0000 (14:26 +0000)]
Update aclocal.m4 to latest OCaml autoconf macros.
Richard W.M. Jones [Fri, 10 Jul 2009 12:22:45 +0000 (12:22 +0000)]
Fix for ARCH_ALIGN_INT64 platforms (Stephane Glondu).
Richard W.M. Jones [Fri, 17 Oct 2008 08:58:29 +0000 (08:58 +0000)]
Version 2.0.0 for release.
Richard W.M. Jones [Fri, 17 Oct 2008 08:58:16 +0000 (08:58 +0000)]
Add regression test for 32/64-bit aligned fastpath extraction.
Richard W.M. Jones [Fri, 17 Oct 2008 08:57:43 +0000 (08:57 +0000)]
On fastpath, 32/64 bit zeros must be allocated each time (Hans Ole Rafaelsen).
Richard W.M. Jones [Mon, 6 Oct 2008 08:43:14 +0000 (08:43 +0000)]
Fix index checks in get/put functions (jessicah)
toots@rastageeks.org [Thu, 28 Aug 2008 16:44:07 +0000 (16:44 +0000)]
Added bootstrap and uninstall target
Richard W.M. Jones [Thu, 28 Aug 2008 09:11:25 +0000 (09:11 +0000)]
Version 1.9.9 for release.
Richard W.M. Jones [Wed, 27 Aug 2008 13:04:46 +0000 (13:04 +0000)]
Updated manifest file.
Richard W.M. Jones [Wed, 27 Aug 2008 13:01:46 +0000 (13:01 +0000)]
Updated test coverage report.
Richard W.M. Jones [Wed, 27 Aug 2008 12:58:25 +0000 (12:58 +0000)]
Test the hexdump function.
Richard W.M. Jones [Wed, 27 Aug 2008 12:56:49 +0000 (12:56 +0000)]
Comprehensive test of fixed-size int construct & extract functions.
Richard W.M. Jones [Wed, 27 Aug 2008 12:56:11 +0000 (12:56 +0000)]
Test the subbitstring and takebits functions.
Richard W.M. Jones [Wed, 27 Aug 2008 12:55:34 +0000 (12:55 +0000)]
Fix buggy construct_int64_ne_unsigned and construct_int64_ee_unsigned functions.
Richard W.M. Jones [Wed, 27 Aug 2008 12:54:57 +0000 (12:54 +0000)]
Check for 'diff' program (now required to run tests).
Richard W.M. Jones [Wed, 27 Aug 2008 11:28:42 +0000 (11:28 +0000)]
Update coverage report.
Richard W.M. Jones [Wed, 27 Aug 2008 11:28:18 +0000 (11:28 +0000)]
Add tests for compare, load, etc.
Richard W.M. Jones [Wed, 27 Aug 2008 11:27:47 +0000 (11:27 +0000)]
Fix 'make test' rule.
Richard W.M. Jones [Wed, 27 Aug 2008 11:26:45 +0000 (11:26 +0000)]
Added:
- Bitstring.compare, Bitstring.equals
- Bitstring.t as a synonym for Bitstring.bitstring type
- get and set functions for mutating individual bits (rarely used)
- Bitstring.concat
Richard W.M. Jones [Tue, 26 Aug 2008 14:18:50 +0000 (14:18 +0000)]
'make clean' rules remove more generated files.
Richard W.M. Jones [Tue, 26 Aug 2008 09:43:14 +0000 (09:43 +0000)]
Version 1.9.8 for release.
Richard W.M. Jones [Tue, 26 Aug 2008 09:42:05 +0000 (09:42 +0000)]
Use ocaml-bisect to compute coverage of tests.
Richard W.M. Jones [Tue, 26 Aug 2008 08:26:23 +0000 (08:26 +0000)]
Add byteswap.in.h
Richard W.M. Jones [Tue, 26 Aug 2008 08:25:42 +0000 (08:25 +0000)]
Ignore *.so files.
Richard W.M. Jones [Tue, 26 Aug 2008 08:24:31 +0000 (08:24 +0000)]
This patch completes the optimization / fastpaths in C enhancement.
Richard W.M. Jones [Tue, 26 Aug 2008 08:22:42 +0000 (08:22 +0000)]
This large, but mostly mechanical, patch removes an unnecessary tuple
allocation from generated code.
Richard W.M. Jones [Tue, 26 Aug 2008 08:21:43 +0000 (08:21 +0000)]
This patch improves the string_of_* functions in Bitmatch_persistent
so that they can print (many) expressions. At the moment they can
only print stuff like "bind ([expr])" for most expressions.
Richard W.M. Jones [Tue, 26 Aug 2008 08:20:41 +0000 (08:20 +0000)]
This patch adds the framework for including C code in bitstring.
Richard W.M. Jones [Tue, 26 Aug 2008 08:16:01 +0000 (08:16 +0000)]
Include benchmarks directory.
Richard W.M. Jones [Tue, 26 Aug 2008 08:13:48 +0000 (08:13 +0000)]
This adds the outline of a benchmark suite to bitstring.
Richard W.M. Jones [Tue, 26 Aug 2008 08:13:07 +0000 (08:13 +0000)]
The attached patch is necessary to work around a bug in the parsing in
OCaml 3.10.0 (fixed in 3.10.2 and later). It doesn't affect
performance of the generated code.
Richard W.M. Jones [Wed, 20 Aug 2008 16:58:33 +0000 (16:58 +0000)]
Added little-endian constructors (thanks to Romain Beauxis and Samuel Mimram).
Richard W.M. Jones [Thu, 17 Jul 2008 15:58:23 +0000 (15:58 +0000)]
Document the bitmatch compatibility library.
Richard W.M. Jones [Thu, 17 Jul 2008 15:45:56 +0000 (15:45 +0000)]
Renaming bitmatch -> bitstring.
Richard W.M. Jones [Thu, 17 Jul 2008 15:09:05 +0000 (15:09 +0000)]
Rename files and libraries from bitmatch* to bitstring*
Richard W.M. Jones [Thu, 17 Jul 2008 12:10:58 +0000 (12:10 +0000)]
Updated TODO file.
Richard W.M. Jones [Thu, 17 Jul 2008 12:10:05 +0000 (12:10 +0000)]
Version 1.9.6 for release.
- Updated MANIFEST.
Richard W.M. Jones [Thu, 17 Jul 2008 11:58:14 +0000 (11:58 +0000)]
Improved test.
Richard W.M. Jones [Thu, 17 Jul 2008 11:56:05 +0000 (11:56 +0000)]
Implement check() and bind() qualifiers.
- Previously check() was called when().
Richard W.M. Jones [Thu, 17 Jul 2008 11:27:13 +0000 (11:27 +0000)]
Implement save_to_offset() and partially implement when() and bind().
Richard W.M. Jones [Thu, 17 Jul 2008 10:33:49 +0000 (10:33 +0000)]
Fix an error message.
Richard W.M. Jones [Thu, 17 Jul 2008 08:55:00 +0000 (08:55 +0000)]
Added when(), bind() and save_offset_to() to the TODO list.
Richard W.M. Jones [Thu, 17 Jul 2008 08:27:01 +0000 (08:27 +0000)]
Set svn:ignore.
Richard W.M. Jones [Thu, 17 Jul 2008 08:26:23 +0000 (08:26 +0000)]
Set svn:keywords property to Id.
Richard W.M. Jones [Thu, 17 Jul 2008 08:25:15 +0000 (08:25 +0000)]
Added offset padding test to test the case when original_off <> 0.
Richard W.M. Jones [Thu, 17 Jul 2008 08:24:47 +0000 (08:24 +0000)]
Implement dropbits, takebits, subbitstring.
Richard W.M. Jones [Thu, 17 Jul 2008 08:24:20 +0000 (08:24 +0000)]
Fix computed offset calculations when original_off <> 0.
Richard W.M. Jones [Fri, 11 Jul 2008 11:10:30 +0000 (11:10 +0000)]
Version 1.9.5 for release.
Richard W.M. Jones [Fri, 11 Jul 2008 11:07:17 +0000 (11:07 +0000)]
Clarify licensing for Debian.
Richard W.M. Jones [Fri, 11 Jul 2008 10:56:31 +0000 (10:56 +0000)]
Fix documentation for how to compile using camlp4 directly.
Richard W.M. Jones [Fri, 4 Jul 2008 13:40:31 +0000 (13:40 +0000)]
Version 1.9.4 for release.
Richard W.M. Jones [Fri, 4 Jul 2008 13:40:07 +0000 (13:40 +0000)]
Somewhat better attempt at a META file.
Richard W.M. Jones [Fri, 4 Jul 2008 12:35:06 +0000 (12:35 +0000)]
Don't allow zero-length patterns to be loaded from a file
Richard W.M. Jones [Fri, 4 Jul 2008 12:03:21 +0000 (12:03 +0000)]
Update status
Richard W.M. Jones [Fri, 4 Jul 2008 11:03:36 +0000 (11:03 +0000)]
Version 1.9.3 for release.
Richard W.M. Jones [Fri, 4 Jul 2008 11:03:17 +0000 (11:03 +0000)]
Include pkg_*
Richard W.M. Jones [Tue, 1 Jul 2008 14:36:25 +0000 (14:36 +0000)]
extlib is needed for CIL tools subdir
Richard W.M. Jones [Tue, 1 Jul 2008 14:21:45 +0000 (14:21 +0000)]
Note about META file
Richard W.M. Jones [Tue, 1 Jul 2008 14:15:18 +0000 (14:15 +0000)]
Allow bitmatch-import-prefix.h to be installed centrally.
Richard W.M. Jones [Tue, 1 Jul 2008 14:02:10 +0000 (14:02 +0000)]
Version 1.9.2 for release.
Richard W.M. Jones [Tue, 1 Jul 2008 14:01:47 +0000 (14:01 +0000)]
Some fixes for building bmpp file.
Richard W.M. Jones [Tue, 1 Jul 2008 12:38:11 +0000 (12:38 +0000)]
Updated MANIFEST
Richard W.M. Jones [Tue, 1 Jul 2008 12:37:03 +0000 (12:37 +0000)]
Version 1.9.1 for release.
Richard W.M. Jones [Tue, 1 Jul 2008 12:35:03 +0000 (12:35 +0000)]
CIL examples.
Richard W.M. Jones [Tue, 1 Jul 2008 12:34:31 +0000 (12:34 +0000)]
Just warn about unimplemented types - they can be safely skipped.
Richard W.M. Jones [Tue, 1 Jul 2008 11:38:46 +0000 (11:38 +0000)]
Refactor raising of Construct_failure exceptions and make the
locations more precise (Bluestorm & RWMJ).
Richard W.M. Jones [Tue, 1 Jul 2008 11:26:12 +0000 (11:26 +0000)]
Make the locations in error messages more specific.
Richard W.M. Jones [Tue, 1 Jul 2008 11:19:34 +0000 (11:19 +0000)]
Refactor constructor and extractor function name generation (Bluestorm).
Richard W.M. Jones [Tue, 1 Jul 2008 11:16:18 +0000 (11:16 +0000)]
Refactor parse_field function (Bluestorm).
Richard W.M. Jones [Tue, 1 Jul 2008 11:09:59 +0000 (11:09 +0000)]
Refactor expr_is_constant (Bluestorm).
Richard W.M. Jones [Tue, 1 Jul 2008 10:12:58 +0000 (10:12 +0000)]
Added string offset tests.