[Seg fault] Wrong content Crashes Firefox(Iceweasel)

Lufei Jia ljia at mozilla.com
Thu Oct 9 05:19:40 UTC 2014


帮你转发给我们工程师了,他们会直接跟你联系~
在 2014/10/8 19:54, lumin 写道:
> Package: iceweasel (firefox on debian)
> Version: 31.1.0esr-1
> Platform: Debian linux testing, amd64, linux 3.16
>
> Hi All,
>
> Recently I am learning UNIX socket programming, and making up a
> http server, and my http server behaves somewhat strangely :)
> then I encountered 2 trouble, as following.
> I admit that I have written a really naughty program.
> SO I DON'T KNOW WHETHER THIS IS MY FAULT OR ISSUE OF FIREFOX.
> You can replay them with my server[1] if you are brave.
>
> ================================================================
> 1. sending a normal .mp4 file to iceweasel makes firefox eat all
> RAM.
> replay:
> ```
> 1. run   $ ./fakehttpd some-funny-clip.mp4
> 2. iceweasel,  localhost:8000
> RAM Eaten.
> ```
> just as commit 3fe0b05089, the default mime-type in response header is
> "Content-Type: text/html; charset=utf-8", it is OK when sending a .html
> file, but when sending a regular .mp4 file with "text/html..." header,
> the Iceweasel ate my all 4GB RAM, however the mp4 file is only 180MB.
>
> ================================================================
> 2. then I changed "text/html ..." to "video/mp4", sending the same .mp4
> file, iceweasel crashes with segmentation fault.
> Replay:
> ```
> $ ./fakehttpd some.mp4
> $ iceweasel    #visit localhost:8000
> (process:2579): GLib-CRITICAL **: g_slice_set_config: assertion
> 'sys_page_size == 0' failed
> (iceweasel:2579): GStreamer-WARNING **: Trying to set string on
> structure field 'debug', but string is not valid UTF-8. Please file a
> bug.
> Segmentation fault
> ```
>
> ** apply this patch to 3fe0b05089 before replay #2, this is what I
> changed **
> @@ -152,9 +152,9 @@ httpd_serve (const char *pathname, int connfd)
>   Date:\n\
>   Server: Fakehttpd\n\
>   Content-Length: %ld\n\
> -Content-Type: text/html; charset=utf-8\n\
> +Content-Type: video/mp4\n\
>   Connection: keep-alive\n\
>
>
> [1] https://github.com/CDLuminate/fakehttpd
> (commit number 3fe0b05089)

-- 
Lufei Jia
贾鹭飞

Mozilla Online Ltd.
firefox.com.cn

Tel:+86 10 85323559-603
QQ: 83296929




More information about the pkg-mozilla-maintainers mailing list