Issue 138855
Summary llvm-strings excessive memory use when used in a pipe
Labels tools:llvm-strings
Assignees
Reporter emaste
    As [reported in FreeBSD bugzilla](https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=286605), after FreeBSD switched from ELF Tool Chain's binary utilities to using LLVM's by default:

```
It seems the LLVM’s version isn’t able to mmap while
used in a pipe, so it copy ALL the file into memory.

Example:
$ dd if=/dev/urandom of=/tmp/test.file bs=1M count=1024
$ cat /tmp/test.file | strings > /dev/null &

Now with elftoolchain’s strings:
$ ps -o pid,command,vsz,rss | grep strings
53243 strings          12992  2556

And with LLVM’strings:
$ ps -o pid,command,vsz,rss | grep strings
41791 strings          5027836 3413864

And with our use-case, we are using strings on GB files
(like core dump), and it is now consumming all our memory.
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to