License compliances, memory-streams, posix compilation, BNode prefix, exception safety#285
License compliances, memory-streams, posix compilation, BNode prefix, exception safety#285gpicciuca wants to merge 8 commits intordfhdt:developfrom
Conversation
|
Had a quick look at your PR and no, the changes you made there are not something we addressed with this one. Most likely because we never encountered those bugs. |
|
The changes I made were due to compiler errors and warnings. I don't know which flags caused the warnings because the problems were reported from a number of different platforms (hdt-cpp is used in some docker images), but probably some subset of these: Anyway, if you have plans to support your fork of hdt-cpp, please tell me. In the meantime, we have a minimally supported fork at https://github.com/JanWielemaker/hdt-cpp (which is used by https://www.swi-prolog.org/pack/list?p=hdt). Of course, it would be best if the main repo were supported, or if the owners would make some statement about their intentions. |
|
I'd love to see this get in! Is there any sort of testing I can help with? |
Hello,
This is a set of contributions that I made as requested by the company/project I work for.
The library is being used in an embedded system, so requirements are strict when it comes to exception and memory handling, and some of the commits target this particular aspect, although they do not cover the whole codebase.
Furthermore, the repository has conflicting licenses which we cannot use and had to be filtered out, such as: libcds, hdt-it
Summary of the changes introduced:
madvisefunction being used inlibhdt/src/util/filemap.cppwas changed toposix_madvisedue to compilation errors.posix_madviseshould be the actual posix-enabled generic method.libhdt/src/sequence/LogSequence.cppwhere we hadHAVE_CSDinstead ofHAVE_CDS. Added sanity checks to gracefully close and clean-up resources for open file handles.HDTManagerto useunique_ptr'sstd::unique_ptrinlibhdt/src/hdt/HDTManager.cppto remove manual heap-allocation vianewkeyword in that layer. Deeper layers of the library still use the old new-allocator. Build file requirements for C++ version was bumped fromC+11toC+14to havestd::unique_ptravailable.-o "bnode.prefix=xxx".std::map::at()method and adds safety checks to prevent exceptions being thrown when keyword is not found.libcdsandhdt-itfrom the repository.hdt-ithas licenseGPL2andlibcdshas licenseGPL2.1, whilelibhdthas licenseLGPL 2.1.libhdtworks regardless of the presence of these folders. Building with or withoutlibcdshas shown absolutely no difference in our use-case, as all the required functionality is already embedded inlibhdt.libhdtandlibcds/hdt-italso have different, conflicting licenses.HDTSpecification::getOrEmptyand replaced it withstd::map::findfor safer error handling. Removed the exception fromAdjancencyList::binSearchdead-end when the algorithm would not find the element, and replaced it with safer error handling logic.Looking forward for some feedback and how to integrate these changes into your mainline and, if not the mainline, then a secondary branch.