Skip to content

Instantly share code, notes, and snippets.

Avatar

Krzysztof Kowalczyk kjk

View GitHub Profile
@kjk
kjk / cppcheck.txt
Last active Jun 3, 2022
cpp check results for sumatra (made with https://codeeval.dev)
View cppcheck.txt
src\utils\ScopedWin.h:223:9: performance: When an object of a class is created, the constructors of all member variables are called consecutively in the order the variables are declared, even if you don't explicitly write them to the initialization list. You could avoid assigning 'prevPen' a value by passing the value to the constructor in the initialization list. [useInitializationList]
prevPen = (HPEN)SelectObject(hdc, pen);
^
src\utils\ScopedWin.h:237:9: performance: When an object of a class is created, the constructors of all member variables are called consecutively in the order the variables are declared, even if you don't explicitly write them to the initialization list. You could avoid assigning 'prevBrush' a value by passing the value to the constructor in the initialization list. [useInitializationList]
prevBrush = (HBRUSH)SelectObject(hdc, pen);
^
src\mui\TextRender.h:108:5: warning: Member variable 'TextRenderGdiplus::measureAlgo' is not initialized in the co
View TabsCtrl.cpp
/* Copyright 2022 the SumatraPDF project authors (see AUTHORS file).
License: Simplified BSD (see COPYING.BSD) */
#include "utils/BaseUtil.h"
#include "utils/ScopedWin.h"
#include "utils/Dpi.h"
#include "utils/WinUtil.h"
#include "wingui/Layout.h"
#include "wingui/Window.h"
@kjk
kjk / main.txt
Created May 21, 2022
mupdf bad stack unwind in error.c (made with https://codeeval.dev)
View main.txt
All crashes
ntdll.dll!RtlRaiseStatus+0x36
ntdll.dll!RtlUnwindEx+0x5b3
ntdll.dll!RtlUnwind+0xcd
libmupdf.dll!__longjmp_internal+0xe9 D:\a\_work\1\s\src\vctools\crt\vcruntime\src\eh\amd64\longjmp.asm+141
libmupdf.dll!throw+0x54 mupdf\source\fitz\error.c+183
libmupdf.dll!fz_rethrow+0xf mupdf\source\fitz\error.c+292
libmupdf.dll!pdf_process_contents+0x1ea mupdf\source\pdf\pdf-interpret.c+1085
libmupdf.dll!pdf_run_page_contents_with_usage_imp+0x3c1 mupdf\source\pdf\pdf-run.c+155
libmupdf.dll!pdf_run_page_contents_with_usage+0xb8 mupdf\source\pdf\pdf-run.c+187
@kjk
kjk / main.txt
Created May 14, 2022
mupdf crash (made with https://codeeval.dev)
View main.txt
All crashes
libmupdf.dll!pdf_cycle+0x24 mupdf\source\pdf\pdf-object.c+2420
libmupdf.dll!pdf_load_colorspace_imp+0x35 mupdf\source\pdf\pdf-colorspace.c+365
libmupdf.dll!load_indexed+0xaa mupdf\source\pdf\pdf-colorspace.c+209
libmupdf.dll!pdf_load_colorspace_imp+0x31e mupdf\source\pdf\pdf-colorspace.c+446
libmupdf.dll!pdf_load_image_imp+0x253 mupdf\source\pdf\pdf-image.c+124
libmupdf.dll!pdf_load_image+0x59 mupdf\source\pdf\pdf-image.c+318
libmupdf.dll!pdf_process_Do+0x159 mupdf\source\pdf\pdf-interpret.c+372
libmupdf.dll!pdf_process_keyword+0x958 mupdf\source\pdf\pdf-interpret.c+803
libmupdf.dll!pdf_process_stream+0x215 mupdf\source\pdf\pdf-interpret.c+979
@kjk
kjk / main.txt
Created May 12, 2022
mupdf crash (made with https://codeeval.dev)
View main.txt
All crashes
libmupdf.dll!pdf_cycle+0x24 mupdf\source\pdf\pdf-object.c+2420
libmupdf.dll!pdf_load_colorspace_imp+0x35 mupdf\source\pdf\pdf-colorspace.c+365
libmupdf.dll!load_indexed+0xaa mupdf\source\pdf\pdf-colorspace.c+209
libmupdf.dll!pdf_load_colorspace_imp+0x31e mupdf\source\pdf\pdf-colorspace.c+446
libmupdf.dll!pdf_load_image_imp+0x253 mupdf\source\pdf\pdf-image.c+124
libmupdf.dll!pdf_load_image+0x59 mupdf\source\pdf\pdf-image.c+318
libmupdf.dll!pdf_process_Do+0x159 mupdf\source\pdf\pdf-interpret.c+372
libmupdf.dll!pdf_process_keyword+0x958 mupdf\source\pdf\pdf-interpret.c+803
libmupdf.dll!pdf_process_stream+0x1eb mupdf\source\pdf\pdf-interpret.c+979
@kjk
kjk / main.go
Last active Dec 10, 2021
gomarkdown example for #216 (made with https://codeeval.dev)
View main.go
package main
import (
"fmt"
"github.com/gomarkdown/markdown"
"github.com/gomarkdown/markdown/parser"
)
const md = `
- [level-1-b](#level-1)
@kjk
kjk / main.go
Created Oct 20, 2021
gomarkdown test (made with https://codeeval.dev)
View main.go
package main
import (
"fmt"
"github.com/gomarkdown/markdown"
"github.com/gomarkdown/markdown/parser"
)
func main() {
extensions := parser.CommonExtensions | parser.AutoHeadingIDs
@kjk
kjk / main.diff
Last active Oct 20, 2021
and description (made with https://codeeval.dev)
View main.diff
+this is a diff
-and there it is
@kjk
kjk / vercel_bug.md
Last active Oct 19, 2021
vercel "api" url bug (made with https://codeeval.dev)
View vercel_bug.md

Update: this bugs seems to be fixed.

Vercel has a bug that if you put "api" anywhere in the URL, it triggers some internal Vercel 404 error.

I discovered it on my website because I had valid page with "api" in the url and it returned internal Vercel error page instead of rendering 404.html

It happens on any website hosted on Vercel.

Example:

@kjk
kjk / main.txt
Created Jul 16, 2021
scratchpad.txt (made with https://codeeval.dev)
View main.txt
C:\Users\kjk\AppData\Local\Temp\sumE1DD.tmp -copy-self-to "C:\Users\kjk\src\sumatrapdf\out\dbg64\SumatraPDF.exe"