Skip to content

Instantly share code, notes, and snippets.

Krzysztof Kowalczyk kjk

Block or report user

Report or block kjk

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View sumatra asan unrar crash.txt
--- C:\Users\kjk\src\sumatrapdf\ext\unrar\arcread.cpp --------------------------
00EA1A50 push ebp
00EA1A51 mov ebp,esp
00EA1A53 and esp,0FFFFFFE0h
00EA1A56 sub esp,18h
// Once we failed to decrypt an encrypted block, there is no reason to
// attempt to do it further. We'll never be successful and only generate
// endless errors.
if (FailedHeaderDecryption)
00EA1A59 lea edx,[ecx+7DF5h]
@kjk
kjk / asan crash in SHGetFileInfo.txt
Last active Dec 7, 2019
msvc asasn crash in SHGetFileInfoW (made with https://codeeval.dev)
View asan crash in SHGetFileInfo.txt
This happened on Win 10. Testing x32 asan build of SumatraPDf.
==10996==ERROR: AddressSanitizer: attempting to call malloc_usable_size() for pointer which is not owned: 0x028f04f8
#0 0x11e502e in __asan_wrap_HeapSize D:\agent\_work\6\s\src\vctools\crt\asan\llvm\compiler-rt\lib\asan\asan_malloc_win.cc:237
#1 0x7629e31b in msize+0x2b (C:\WINDOWS\System32\ucrtbase.dll+0x1002e31b)
#2 0x7629e7d1 in register_onexit_function+0x231 (C:\WINDOWS\System32\ucrtbase.dll+0x1002e7d1)
#3 0x7629e68d in register_onexit_function+0xed (C:\WINDOWS\System32\ucrtbase.dll+0x1002e68d)
#4 0x7629e61c in register_onexit_function+0x7c (C:\WINDOWS\System32\ucrtbase.dll+0x1002e61c)
#5 0x7629c30f in o__register_onexit_function+0x6f (C:\WINDOWS\System32\ucrtbase.dll+0x1002c30f)
#6 0x7629c2af in o__register_onexit_function+0xf (C:\WINDOWS\System32\ucrtbase.dll+0x1002c2af)
@kjk
kjk / filesize.js
Created Nov 29, 2019
human-readable file size in JavaScript (made with https://codeeval.dev)
View filesize.js
// https://raw.githubusercontent.com/avoidwork/filesize.js/master/src/filesize.js
/**
* filesize
*
* @method filesize
* @param {Mixed} arg String, Int or Float to transform
* @param {Object} descriptor [Optional] Flags
* @return {String} Readable file size String
*/
function filesize (arg, descriptor = {}) {
View main.go
package main
import (
"bytes"
"fmt"
"log"
"os/exec"
)
func main() {
View function.cc
#include <iostream>
// function declaration
int add2(int i);
// functin overloading: same name but different arguments
int add2(int i, int j);
// default arguments: i is optional, if not given will be 0
int add3(int i = 0);
// function defintion
@kjk
kjk / main.txt
Created Nov 20, 2019
description (made with https://codeeval.dev)
View main.txt
TextColor = #5f4b32
BackgroundColor = #fbf0d9
sdfa
View strtotime.go
package main
import (
"fmt"
"github.com/carmo-evan/strtotime"
"time"
"log"
)
func main() {
@kjk
kjk / pupdl.js
Created Nov 17, 2019
puppeteer download page (made with https://codeeval.dev)
View pupdl.js
'use strict';
const puppeteer = require('puppeteer');
const fs = require('fs');
(async function main() {
try {
const browser = await puppeteer.launch();
const [page] = await browser.pages();
@kjk
kjk / main.go
Last active Nov 10, 2019
trimEmptyLinesFromEnd (made with https://codeeval.dev)
View main.go
package main
import (
"fmt"
"strings"
)
func trimEmptyLinesFromEnd(a []string) []string {
for len(a) > 0 {
lastIdx := len(a) - 1
View index.js
let v;
console.log(v);
v = 5;
console.log(v);
v = "str";
console.log(v);
You can’t perform that action at this time.