Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
94383fe
Read-only walks to const accessors across content parsing
bobsingor May 8, 2026
7bfcd90
AP becomes ephemeral
bobsingor May 8, 2026
71516c3
CPDF_AnnotList preserves direct annotations
bobsingor May 8, 2026
2dd7caa
CPDF_InteractiveForm const walk + explicit normalize
bobsingor May 8, 2026
b50c87f
CPDF_Image and CPDF_DocPageData cache hardening
bobsingor May 8, 2026
3cdfb37
Install macros
bobsingor May 8, 2026
87aec2e
Widen all internal seams
bobsingor May 9, 2026
4e5781e
CPDF_BaseDocument + eager parse + freeze
bobsingor May 9, 2026
ef257ba
CPDF_LayerDocument (read fall-through)
bobsingor May 9, 2026
b345d99
COW on actual mutable handle USE
bobsingor May 9, 2026
a591805
CloneForHolder + PromoteFromBase
bobsingor May 9, 2026
502f817
EPDFLayer_SaveDeltaToBuffer + creator append-only mode
bobsingor May 9, 2026
2cde580
Introspection + benchmarks + soak
bobsingor May 9, 2026
986cd2e
Finish opening file with delta
bobsingor May 10, 2026
7d468af
ReadOnlyLayerWorkflowsProduceEmptyDelta
bobsingor May 10, 2026
8191aeb
Keep layer read paths from promoting page and name-tree state
bobsingor May 10, 2026
efe597b
Add some more tests
bobsingor May 12, 2026
a3f16c2
Prune unreachable new PDF objects during save
bobsingor May 12, 2026
f769de7
Add EPDF_LoadMemBaseDocument API
bobsingor May 15, 2026
df00447
Add EPDF_LoadMemBaseDocument64 and helpers
bobsingor May 15, 2026
f66d083
Add GetPageObjectNumberByIndex API and tests
bobsingor May 15, 2026
1bdc674
Const-correct annot APIs; add annot index
bobsingor May 17, 2026
ac54d56
Fix some readonly paths
bobsingor May 17, 2026
19fbb6d
Honor layer overlays when collecting objects
bobsingor May 17, 2026
b57a70c
Add redaction API and form XObject helper
bobsingor May 18, 2026
c72e4f8
Merge branch 'embedpdf/main' into embedpdf/feature/read-purity
bobsingor May 21, 2026
66cb147
Add EPDFLayer_SaveLayerArtifact API
bobsingor May 24, 2026
211d129
Add password-probe and runtime owner APIs
bobsingor May 27, 2026
25b803a
Add EMBD_Metadata API for annotation embed data
bobsingor May 27, 2026
ee61c10
Add APIs to query page boxes and UserUnit
bobsingor May 30, 2026
ef3f53b
Promote and save /Info for layer documents
bobsingor May 31, 2026
06594e0
Move pending security into CPDF_Document
bobsingor Jun 2, 2026
f87f6b6
Add optional thread-local globals and thread-soak test
bobsingor Jun 2, 2026
af64b09
Make s_CurrentRecursionDepth thread-local
bobsingor Jun 2, 2026
0267271
Add test PDFs with bad ICC profiles
bobsingor Jun 2, 2026
ad5c71a
Fix gmtime handling and add platform defines
bobsingor Jun 2, 2026
2520dc1
Update cmswtpnt.c
bobsingor Jun 2, 2026
74b6d9c
Address thread-safety in lcms helpers
bobsingor Jun 2, 2026
deb3657
Add EPDFDoc page APIs (delete/set/normalize)
bobsingor Jun 15, 2026
adc5c20
Merge pull request #29 from embedpdf/embedpdf/feature/thread-confined
bobsingor Jun 15, 2026
d17968e
Avoid null-replacing base pages in layer deltas
bobsingor Jun 15, 2026
2df8155
LayerDocument: const Root & mutable PageDict
bobsingor Jun 15, 2026
f098ad8
Use cached reachable-objects set and add test
bobsingor Jun 15, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 79 additions & 0 deletions .github/workflows/pdfium-tsan-thread-soak.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: PDFium TSAN Thread Soak

on:
workflow_dispatch:
inputs:
ref:
description: Git ref to test
required: false
default: embedpdf/main
pdf_path:
description: PDF fixture to render during the soak
required: false
default: testing/resources/hello_world.pdf
threads:
description: Number of worker threads
required: false
default: '2'
iterations:
description: Iterations per worker thread
required: false
default: '2'

permissions:
contents: read

jobs:
tsan-thread-soak:
name: Linux x64 TSAN thread soak
runs-on: ubuntu-24.04
timeout-minutes: 90
env:
PDF_RUNTIME_SYNC: auto
PDF_RUNTIME_TARGET_OS_LIST: linux
EMBEDPDF_TLS_GLOBALS: true
EMBEDPDF_TSAN: 1
PDF_PATH: ${{ inputs.pdf_path }}
SOAK_THREADS: ${{ inputs.threads }}
SOAK_ITERATIONS: ${{ inputs.iterations }}
SOAK_OUT: out/embedpdf-runtime-thread-soak-linux-x64

steps:
- uses: actions/checkout@v6
with:
ref: ${{ inputs.ref || github.ref_name }}

- name: Install depot_tools
shell: bash
run: |
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git "$RUNNER_TEMP/depot_tools"
echo "$RUNNER_TEMP/depot_tools" >> "$GITHUB_PATH"

- name: Install Linux base deps
shell: bash
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends cmake clang lld curl g++ ninja-build pkg-config tar

- name: Run TSAN thread soak
shell: bash
run: |
set -euo pipefail
mkdir -p "$SOAK_OUT"
scripts/embedpdf-runtime/thread-soak-target.sh \
linux-x64 \
"$PDF_PATH" \
-- \
--threads="$SOAK_THREADS" \
--iterations="$SOAK_ITERATIONS" \
2>&1 | tee "$SOAK_OUT/thread-soak.log"

- name: Upload TSAN logs
if: always()
uses: actions/upload-artifact@v6
with:
name: pdfium-tsan-thread-soak-logs
path: |
out/embedpdf-runtime-thread-soak-linux-x64/thread-soak.log
out/embedpdf-runtime-thread-soak-linux-x64/args.gn
if-no-files-found: ignore
11 changes: 11 additions & 0 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,13 @@ config("pdfium_common_config") {
defines += [ "PDF_USE_PARTITION_ALLOC" ]
}

# EmbedPDF: thread-confined runtime. Translates the embedpdf_thread_local_globals
# GN arg into the EPDF_THREAD_LOCAL_GLOBALS define consumed by EPDF_TLS
# (core/fxcrt/epdf_tls.h). Default off; see pdfium.gni.
if (embedpdf_thread_local_globals) {
defines += [ "EPDF_THREAD_LOCAL_GLOBALS" ]
}

if (is_win) {
# Assume UTF-8 by default to avoid code page dependencies.
cflags += [ "/utf-8" ]
Expand Down Expand Up @@ -191,6 +198,7 @@ source_set("pdfium_public_headers_impl") {
sources = [
"public/cpp/fpdf_deleters.h",
"public/cpp/fpdf_scopers.h",
"public/epdf_redact.h",
"public/fpdf_annot.h",
"public/fpdf_attachment.h",
"public/fpdf_catalog.h",
Expand Down Expand Up @@ -431,6 +439,9 @@ group("pdfium_all") {
":pdfium_unittests",
"testing:pdfium_test",
"testing/fuzzers",
"testing/tools:epdf_layer_memory_benchmark",
"testing/tools:epdf_layer_replay_soak",
"testing/tools:epdf_thread_soak",
]

if (pdf_is_standalone) {
Expand Down
1 change: 1 addition & 0 deletions core/fpdfapi/edit/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ source_set("contentstream_write_utils") {

pdfium_unittest_source_set("unittests") {
sources = [
"cpdf_creator_unittest.cpp",
"cpdf_npagetooneexporter_unittest.cpp",
"cpdf_pagecontentgenerator_unittest.cpp",
]
Expand Down
Loading