Comments (3)
Removing this option resolved:
--run-libc-freeres=no
from libsnowflakeclient.
The option was added to mitigate this: snowflakedb/pdo_snowflake#15
for PHP PDO tests. For C API, let's remove it.
from libsnowflakeclient.
For future reference, here is a simple test case that causes the valgrind error:
#include <pthread.h>
#include <stdio.h>
#include <errno.h>
#include <stdlib.h>
#include <unistd.h>
static void *chunk_downloader_thread(void *downloader) {
printf("STARTING thread \n");
printf("EXITING thread...\n");
sleep(1);
return NULL;
}
int main() {
pthread_t t;
printf("create: %d\n", pthread_create(&t, NULL, &chunk_downloader_thread, (void*)NULL));
printf("join: %d\n", pthread_join(t, NULL));
exit(0);
}
gcc -pthread test_simple_thread.c
valgrind --tool=memcheck --leak-check=full --run-libc-freeres=no ./a.out
==24498== Memcheck, a memory error detector
==24498== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al.
==24498== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==24498== Command: ./a.out
==24498==
create: 0
STARTING thread
EXITING thread...
join: 0
==24498==
==24498== HEAP SUMMARY:
==24498== in use at exit: 560 bytes in 1 blocks
==24498== total heap usage: 1 allocs, 0 frees, 560 bytes allocated
==24498==
==24498== 560 bytes in 1 blocks are possibly lost in loss record 1 of 1
==24498== at 0x4A057BB: calloc (vg_replace_malloc.c:593)
==24498== by 0x39D3811D02: _dl_allocate_tls (in /lib64/ld-2.12.so)
==24498== by 0x39D44072CC: pthread_create@@GLIBC_2.2.5 (in /lib64/libpthread-2.12.so)
==24498== by 0x4006E7: main (in /home/stakeda/test_cpp/a.out)
==24498==
==24498== LEAK SUMMARY:
==24498== definitely lost: 0 bytes in 0 blocks
==24498== indirectly lost: 0 bytes in 0 blocks
==24498== possibly lost: 560 bytes in 1 blocks
==24498== still reachable: 0 bytes in 0 blocks
==24498== suppressed: 0 bytes in 0 blocks
==24498==
==24498== For counts of detected and suppressed errors, rerun with: -v
==24498== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 8 from 6)
Again this is false alarm. We should not use --run-libc-freeres=no
unless really needed.
from libsnowflakeclient.
Related Issues (20)
- Snyk: libsnowflakeclient org.apache.struts:struts-core 1.3.8 | Snyk ID - SNYK-JAVA-ORGAPACHESTRUTS-2841503
- Snyk: libsnowflakeclient org.apache.velocity:velocity 1.7 | Snyk ID - SNYK-JAVA-ORGAPACHEVELOCITY-3116414
- Snyk: libsnowflakeclient org.apache.struts:struts-core 1.3.8 | Snyk ID - SNYK-JAVA-ORGAPACHESTRUTS-480475
- Snyk: libsnowflakeclient System.Net.Http 4.3.0 | Snyk ID - SNYK-DOTNET-SYSTEMNETHTTP-60048
- Snyk: libsnowflakeclient com.google.guava:guava 20.0 | Snyk ID - SNYK-JAVA-COMGOOGLEGUAVA-5710356
- Snyk: libsnowflakeclient System.Net.Http 4.3.0 | Snyk ID - SNYK-DOTNET-SYSTEMNETHTTP-60045
- Snyk: libsnowflakeclient io.netty:netty-handler 4.1.27.Final | Snyk ID - SNYK-JAVA-IONETTY-5725787
- Snyk: libsnowflakeclient io.netty:netty-codec-http2 4.1.38 | Snyk ID - SNYK-JAVA-IONETTY-5953332
- Snyk: libsnowflakeclient io.netty:netty-codec-http2 4.1.38 | Snyk ID - SNYK-JAVA-IONETTY-5953332
- Snyk: libsnowflakeclient commons-collections:commons-collections 3.2 | Snyk ID - SNYK-JAVA-COMMONSCOLLECTIONS-30078
- Snyk: libsnowflakeclient commons-collections:commons-collections 3.2 | Snyk ID - SNYK-JAVA-COMMONSCOLLECTIONS-472711
- Snyk: libsnowflakeclient System.Net.Http 4.3.0 | Snyk ID - SNYK-DOTNET-SYSTEMNETHTTP-60046
- Snyk: libsnowflakeclient io.netty:netty-handler 4.1.27.Final | Snyk ID - SNYK-JAVA-IONETTY-1042268
- Snyk: libsnowflakeclient io.netty:netty-handler 4.1.27.Final | Snyk ID - SNYK-JAVA-IONETTY-1042268
- Snyk: libsnowflakeclient org.apache.avro:avro 1.9.2 | Snyk ID - SNYK-JAVA-ORGAPACHEAVRO-5926693
- Snyk: libsnowflakeclient System.Net.Http 4.3.0 | Snyk ID - SNYK-DOTNET-SYSTEMNETHTTP-72439
- Snyk: libsnowflakeclient System.Net.Http 4.3.0 | Snyk ID - SNYK-DOTNET-SYSTEMNETHTTP-60047
- Snyk: libsnowflakeclient System.Text.RegularExpressions 4.3.0 | Snyk ID - SNYK-DOTNET-SYSTEMTEXTREGULAREXPRESSIONS-174708
- Snyk: libsnowflakeclient dom4j:dom4j 1.1 | Snyk ID - SNYK-JAVA-DOM4J-174153
- Snyk: libsnowflakeclient dom4j:dom4j 1.1 | Snyk ID - SNYK-JAVA-DOM4J-2812975
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libsnowflakeclient.