Skip to content
This repository was archived by the owner on Sep 22, 2025. It is now read-only.

Commit 425b8cd

Browse files
qpl-java-0.9.1 alpha release
1 parent 488755b commit 425b8cd

25 files changed

+1456
-565
lines changed

.clang-format

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
Language: Cpp
3+
BasedOnStyle: Google
4+
---
5+
Language: Java
6+
BasedOnStyle: Google

README.md

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ This library will allow Java* applications to communicate with the Intel® Query
1313
### PREREQUISITES TO BUILD ###
1414
The following are the prerequisites for building this Java library:
1515

16-
1. Intel® QPL library - To build, Intel® QPL follow [System Requirements](https://intel.github.io/qpl/documentation/get_started_docs/installation.html) and [Installation](https://intel.github.io/qpl/documentation/get_started_docs/installation.html).
17-
2. Java 11 or above
16+
1. Intel® QPL library - To build, Intel® QPL follow [Installation](https://intel.github.io/qpl/documentation/get_started_docs/installation.html).
17+
Make sure Intel® QPL library installed into either "/usr/local/lib64" or "/usr/local/lib".
18+
2. Java 8 or above
1819
3. Build tools - **g++**, **CMake** and **Maven**
1920

2021

@@ -23,24 +24,42 @@ This library assumes the availability of Intel® IAA hardware.
2324

2425
For more information about the Intel® In-Memory Analytics Accelerator, refer to the [IAA spec](https://cdrdv2.intel.com/v1/dl/getContent/721858) on the [Intel® 64 and IA-32 Architectures Software Developer Manuals](https://www.intel.com/content/www/us/en/developer/articles/technical/intel-sdm.html) page.
2526

26-
### STEPS TO BUILD AND RUN TESTS ###
27+
### STEPS TO BUILD ###
2728
Once all the prerequisites have been satisfied:
2829
```
2930
$ git clone https://github.com/intel/qpl-java.git
3031
$ cd qpl-java
31-
$ mvn clean
32-
$ mvn compile
33-
$ mvn test
34-
$ mvn package
32+
$ mvn clean package
3533
```
3634

3735
Available Maven commands include:
3836

3937
- `compile` - builds sources
4038
- `test` - builds and runs tests
39+
- `site` - generates Surefire report into ```target/site```
4140
- `javadoc:javadoc` - builds javadocs into ```target/site/apidocs```
4241
- `package` - builds jar file into ```target``` directory
4342

43+
### LIBRARY TESTING ###
44+
This library supports both functional and Fuzz testing.
45+
46+
##### FUNCTIONAL TEST #####
47+
To run all the functional tests, execute the following command:
48+
```
49+
mvn clean test
50+
```
51+
##### FUZZ TEST #####
52+
Jazzer tool is used to enable fuzz testing on this project.
53+
54+
see [here](https://github.com/CodeIntelligenceTesting/jazzer/blob/main/CONTRIBUTING.md) for Jazzer dependencies.
55+
56+
57+
To run the Fuzz tests, execute the following command:
58+
```
59+
mvn clean test -Dfuzzing=true
60+
```
61+
The above command executes each Jazzer Fuzz tests for 10 seconds.
62+
To run for a longer duration, modify ```-max_total_time``` fuzzParameter in pom.xml
4463
### USING THIS LIBRARY IN EXISTING JAVA APPLICATIONS ###
4564
To use this library in your Java application, build the qpl-java jar and include
4665
its location in your Java classpath. For example:
@@ -64,4 +83,4 @@ For more information on this library, contact Kokoori, Shylaja (shylaja.kokoori@
6483

6584
 
6685

67-
><b id="f1">*</b> Java is a registered trademark of Oracle and/or its affiliates.
86+
><b id="f1">*</b> Java is a registered trademark of Oracle and/or its affiliates.

pom.xml

Lines changed: 414 additions & 123 deletions
Large diffs are not rendered by default.

src/main/cpp/CMakeLists.txt

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,23 @@
77
cmake_minimum_required(VERSION 3.16.3)
88
project(qpl-java)
99
set(CMAKE_BUILD_TYPE Release)
10-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -fPIC -std=c++17 -shared -D_FORTIFY_SOURCE=2 -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wformat -Wformat-security -Werror=format-security -fstack-protector")
10+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -fPIC -shared -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wformat -Wformat-security -Werror=format-security -fstack-protector")
1111
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -pie")
1212

13+
# Build options
14+
option(SANITIZE_MEMORY "Enables memory sanitizing" OFF)
15+
16+
# Print user's settings
17+
message(STATUS "Memory sanitizing build: ${SANITIZE_MEMORY}")
18+
19+
if (SANITIZE_MEMORY)
20+
set (CMAKE_CXX_COMPILER "/usr/bin/clang++")
21+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=fuzzer-no-link,address")
22+
else()
23+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -D_FORTIFY_SOURCE=2")
24+
25+
endif ()
26+
1327
#include Java packages
1428
FIND_PACKAGE(Java REQUIRED)
1529
FIND_PACKAGE(JNI REQUIRED)

0 commit comments

Comments
 (0)