Mozilla Nederland LogoDe Nederlandse

Ook Deutsche Telekom en Mozilla komen met veilige smartphone - Connexie B2B

Nieuws verzameld via Google - wo, 25/02/2015 - 08:04

Ook Deutsche Telekom en Mozilla komen met veilige smartphone
Connexie B2B
Via The Wall Street Journal komt het bericht dat Deutsche Telekom, eigenaar van onder andere T-Mobile, en Mozilla, bekend van Firefox en de mail-applicatie Thunderbird, op de MWC in Barcelona volgende week een extra veilige smartphone gaan ...

Categorieën: Mozilla-nl planet

Mozilla Firefox 36 is here - AfterDawn

Nieuws verzameld via Google - wo, 25/02/2015 - 04:44


Mozilla Firefox 36 is here
Mozilla Firefox 36 is here Mozilla has released Firefox 36 to the public today, giving fans of the browser a stable version while the beta moves to 37 and the nightly alphas move to 39. On the surface, the update is minor but there are some tweaks ...
Mozilla Firefox v35 review: Now with speed to match the incredible range of ...PC Advisor
Firefox 36 Gains HTTP/2 Support, Fixes Critical VulnerabilitieseWeek
Firefox 35.0.1 Now Available for Free Download – Check Out What's NewOrdoh

alle 8 nieuwsartikelen »
Categorieën: Mozilla-nl planet

Michael Kaply: What I Do

Mozilla planet - di, 24/02/2015 - 20:23

One of the trickier things about being self-employed, especially around an open source project like Firefox, is knowing where to draw the line between giving out free advice and asking people to pay for my services. I'm always hopeful that answering a question here and there will one day lead to folks hiring me or purchasing CCK2 support. That's why I try to be as helpful as I can.

That being said, I'm still surprised at the number of times a month I get an email from someone requesting that I completely customize Firefox to their requirements and deliver it to them for free. Or write an add-on for them. Or diagnose the problem they are having with Firefox.

While I appreciate their faith in me, somehow I think it's gotten lost somewhere that this is what I do for a living.

So I just wanted to take a moment and let people know that you can hire me. If you need help with customizing and deploying Firefox, or building Firefox add-ons or building a site-specific browser, that's what I do. And I'd be more than happy to help you do that.

But if all you have is a question, that's great too. The best place to ask is on my support site at

Categorieën: Mozilla-nl planet

Firefox 36: Download und Praxis-Test - COMPUTER BILD

Nieuws verzameld via Google - di, 24/02/2015 - 20:21


Firefox 36: Download und Praxis-Test
Special Special: Firefox – Neuer Mozilla-Browser ist da. Firefox 36: Download und Praxis-Test. von unserem Autor Markus Schmidt. 24.02.2015, 18:15 Uhr Mit Firefox 36 steht eine frische Version des beliebten Mozilla-Browsers zum Download bereit.
Mozilla: Firefox 36 kann HTTP/
Firefox 36 unterstützt HTTP/2 für schnelleres SurfenPC-Welt
Firefox 36 freigegebenPro-Linux

alle 5 nieuwsartikelen »
Categorieën: Mozilla-nl planet

Mozilla brengt Firefox 36 met http/2-ondersteuning uit - Tweakers

Nieuws verzameld via Google - di, 24/02/2015 - 19:49

Mozilla brengt Firefox 36 met http/2-ondersteuning uit
Mozilla rolt de versie, Firefox 36, momenteel uit. Het gaat om één van de eerste browsers die standaard over de http/2-standaard beschikt. Die volgde pas de http 1.1-specificatie op en moet onder andere het sneller inladen van webpagina's mogelijk maken.

Categorieën: Mozilla-nl planet

The Mozilla Blog: Firefox for Android Gets a Simpler, Sleeker New Look for Tablets

Mozilla planet - di, 24/02/2015 - 17:00

We’re constantly working on ways to give you the best Firefox experience, everywhere you are. That’s why our goal with the new Firefox for Android look on tablets was to simplify the interaction with tabs and allow users to create, remove and switch tabs with a single tap.

We’ve also revamped the toolbar and added a new, full screen tab panel for a sleek, visual overview of tabs.

Categorieën: Mozilla-nl planet

Mozilla: Firefox 36 kann HTTP/2 -

Nieuws verzameld via Google - di, 24/02/2015 - 16:40

Mozilla: Firefox 36 kann HTTP/2
Neue Tablet-Oberfläche. Für die mobile Variante des Browsers haben die Mozilla-Entwickler eine neue Oberfläche umgesetzt, die viel deutlicher als bisher an das Aussehen der Desktop-Varianten erinnert. Wohl am auffälligsten ist die Tab-Leiste am oberen ...
Firefox 36 unterstützt HTTP/2 für schnelleres SurfenPC-Welt

alle 3 nieuwsartikelen »
Categorieën: Mozilla-nl planet

Unreal Engine 4.7 Binary Release Includes HTML5 Export

Mozilla Blog - di, 24/02/2015 - 15:09

With the launch of Unreal Engine 4.7, Epic Games has added the ability to export to HTML5 as a regular part of their Windows binary engine releases. One of the world’s most advanced game engines is one step closer to delivering truly amazing content right in your browser. With this addition, developers will be able to create content in Unreal Engine 4.7, immediately compile it to the Web, and launch it in their browser of choice with the click of a button.

InstructionEpic Games’ work with WebGL and HTML5 has been part of the Unreal Engine 4 source code distribution for many months and has been maturing over the past year. While still a pre-release version, the HTML5 output is robust enough for developers to use it with their content and give feedback on the technology. Mozilla is excited to support Epic Games in their continuing effort to bring this amazing engine to the Web.


Screenshot of output from UE4

In the leadup to GDC, Mozilla will be publishing a series of articles about different aspects of the technology that makes it possible to bring native engines to the Web. Mozilla will also be showcasing several next generation Web technologies at our booth including WebVR demos built in Unreal Engine 4. Output from the engine will also be used to showcase Firefox Developer Tools and demonstrate how they can be leveraged with this type of content.

Mozilla will be taking part in Epic’s HTML5 export presentation which will be broadcast live on Twitch at 2pm PT Thursday, March 5th, and viewed at

For more information on this news from Epic Games, visit their blog.

Come take a look at where the Web is heading at the Firefox Booth (South Hall Booth #2110) or learn more about Unreal Engine 4.7 at Epic Games’ Booth (South Hall Booth #1024).

Categorieën: Mozilla-nl planet

The Mozilla Blog: Unreal Engine 4.7 Binary Release Includes HTML5 Export

Mozilla planet - di, 24/02/2015 - 15:09

With the launch of Unreal Engine 4.7, Epic Games has added the ability to export to HTML5 as a regular part of their Windows binary engine releases. One of the world’s most advanced game engines is one step closer to delivering truly amazing content right in your browser. With this addition, developers will be able to create content in Unreal Engine 4.7, immediately compile it to the Web, and launch it in their browser of choice with the click of a button.

InstructionEpic Games’ work with WebGL and HTML5 has been part of the Unreal Engine 4 source code distribution for many months and has been maturing over the past year. While still a pre-release version, the HTML5 output is robust enough for developers to use it with their content and give feedback on the technology. Mozilla is excited to support Epic Games in their continuing effort to bring this amazing engine to the Web.


Screenshot of output from UE4

In the leadup to GDC, Mozilla will be publishing a series of articles about different aspects of the technology that makes it possible to bring native engines to the Web. Mozilla will also be showcasing several next generation Web technologies at our booth including WebVR demos built in Unreal Engine 4. Output from the engine will also be used to showcase Firefox Developer Tools and demonstrate how they can be leveraged with this type of content.

Mozilla will be taking part in Epic’s HTML5 export presentation which will be broadcast live on Twitch at 2pm PT Thursday, March 5th, and viewed at

For more information on this news from Epic Games, visit their blog.

Come take a look at where the Web is heading at the Firefox Booth (South Hall Booth #2110) or learn more about Unreal Engine 4.7 at Epic Games’ Booth (South Hall Booth #1024).

Categorieën: Mozilla-nl planet

T-Mobile And Mozilla Will Launch A New 'Privacy Phone' - TechCrunch

Nieuws verzameld via Google - di, 24/02/2015 - 13:26


T-Mobile And Mozilla Will Launch A New 'Privacy Phone'
In a bid for more traction in the ever-saturated mobile market, Deutsche Telekom, the German parent of T-Mobile, and Mozilla are taking a step forward together. The two have developed a new “privacy phone”, built on Mozilla's Firefox OS and compliant ...
Mozilla: Consumers should wake up to privacy issues from 'eerie' wearables and ...Expert Reviews

alle 2 nieuwsartikelen »
Categorieën: Mozilla-nl planet

Christian Heilmann: Making distributed team meetings work

Mozilla planet - di, 24/02/2015 - 10:16

Being in a distributed team can be tough. Here are a few tricks I learned over the years to make distributed meetings easier.
This is cross-posted on Medium, you can comment there.

Man on phone with 'shut up' on whiteboard behind himPhoto Credit: Tim Caynes

Working as distributed teams is a red flag for a lot of companies. Finding a job that allows you to work remote is becoming a rare opportunity. As someone who worked remote for the last few years I can say though that it is a much better way of working. And it results in more effective and above all, happier, teams.

What it needs is effort by all involved to succeed and often a few simple mistakes can derail the happy train.

The big issue, of course, is time difference. It is also a massive opportunity. A well organised team can cover a product in half the time. To achieve that, you need well organised and honest communication. Any promise you can’t keep means you lost a whole day instead of being able to deliver quicker.

There are many parts to this, but today, I want to talk about meetings with distributed teams. In the worst case, these are phone conferences. In the best case, you have a fancy video conferencing system all people in your team can use.

Quick aside: a lot of people will use this as an opportunity to tell me about their amazing software solutions for this problem. I am sure you can tell me a lot about your multi-media communication system with supercharged servers and affordable rates. Please, don’t. I don’t buy these things and I also have seen far too many fail. Connectivity and travel don’t go too well together. The crystal clear, uninterrupted, distraction-free meetings we see in advertisements are a product of fiction. You might as well add unicorns, at least that would make them fabulous. I’ve seen too many bad connections and terrible surroundings. What they taught me is that planning for failure beats any product you can buy. Hence these tips here.

Synchronous Asynchronicity?
World online information
Meetings are synchronous – you expect all people to be in one place at the same time. Distributed teams work asynchronous. While one part is doing the work, the others are sleeping or having a social life until it is time to switch over.
Thus, if you have a meeting at 10 in the morning California time and you talk to people in Europe you have two kind of people in the virtual room:

  • Those who already had a whole day of work with all the joys and annoyances it brings
  • Those who just got up, far too early for their own liking and got stuck in transit. Either on a packed motorway or involuntarily nestling in the armpit of a total stranger in an overcrowded train

In any case, both are kind of weary and annoyed. Without proper planning, this isn’t an opportunity for knowledge sharing. It is a recipe for disaster as both groups have wildly diverging agendas about this meeting.

  • One group wants to give an update what they did today, hand over and call it a day and
  • The other group wants to know what is important today and get on with it to fight off the cobwebs of commuting

As an expert remote worker you start to diffuse this issue a bit by shifting your daily agenda around. You allow for a few hours of overlap, either by staying longer on the job and starting later in the early afternoon. Or by getting up much earlier and communicating with your colleagues at home before leaving for the office. This works well as long as you don’t have a partner that works normal hours or you live in a country where shops close early.

In any case, you need to find a way to make both groups more efficient in this meeting, so here is the first trick:

Separate the meeting into remote updates and social interactions
sandwichPhoto by Ron Dolette

This may sound weird, but you can’t have both. Having a meeting together in a room in the office is great for the locals:

  • You can brainstorm some ideas in an animated discussion where everyone talks
  • You can cover local happenings (“did you see the game last night? What a ludicrous display”)
  • You can have a chat about what’s bothering you (“damn, the office is cold today”) and
  • talk about location-specific issues and socialise.

This doesn’t work when the topic of discussion is current and about the location you are in. Telling someone eight hours ahead and far away from you that you will enjoy company-provided food right after the event is not helping their morale — on the contrary. It alienates people outside the group even more than they already feel. It is great for the team in the room though. Don’t let one’s group perk become the others reason for jealousy.

By separating your meeting into four parts, you can focus better on giving the right people what they came for and get their updates. Make it a meeting sandwich:

  • Meet in the room, have a quick social chat,
  • Dial in the remote participants, ask them about a quick social update,
  • Have a focused info session with both groups,
  • Let the remote people disconnect and phase out the meeting with another local, social update.

This way everybody uses their time efficiently, feels listened to and not bothered by updates or benefits that don’t apply to them. I have seen this work well in the past. It also resulted in much shorter meetings and we all love those.

Have a clear agenda and turn it into live meeting notes
a clear plan where we are and what's coming
Sending out an agenda before the meeting makes things crystal clear. People know if it is worth to join and can choose not to. Make sure that all the resources you cover in the meeting are linked in the agenda. Make sure that these resources are publicly available to all people in the meeting and not on someone’s internal IP or file share only a few have access to. Having to ask “what is Margaret talking about, where can I find this?” is distracting and frustrating.

During the meeting you can add notes and findings to the agenda items. This has a lot of benefits:

  • People who can not attend the meeting or drop off half way through can look up what happened later.
  • You have an archive of your meetings without having the extra work of publishing meeting notes.
  • People who missed the meeting can scan the meeting results. This is much easier than listening to an hour long recording or watching a video of people in a room talking to a microphone. As beneficial as a video call is when you are all live, it gets tedious and hard to navigate to the items you care about when it is a recording.

Be aware of sound distractions
tis be the time of hammer
In essence what you are dealing with here is a many to one conversation. If you have several people talking to you and you can see them, this is not an issue. If you can’t see them and you don’t even have a spatial recognition where the sound comes from, it all blurs together. That’s why it is important to have one person speak at any time and others to be aware of the fact that any noise they make is distracting. This means:

  • As someone remote, mute your microphone. There is nothing more annoying than the clatter of a keyboard magnified by the microphone just above it
  • As someone in the room with others, lean away from the microphone. Don’t cough into it, don’t shift things around on the table the mic is standing on. Coffee mugs, spoons and pens can be incredibly loud on those.
  • As the speaker, lean into the microphone and speak clearly – always assume there is static and sound loss. A mumbled remark in the back of the room followed by laughter by all could come across to a remote listener as an inside joke or even an insult. No need to risk such misunderstandings.
  • If you switch the speaker, tell them to introduce themselves. This may feel silly in the room, but it helps avoiding confusion on the other side.

Use a chat system as the lifeline of the meeting
Bad skype quality
Video and Audio chat will always go wrong in one way or another. The problem is that when you are presenting the system won’t tell you that. You are not aware that the crystal clear image of yourself with perfect sound is a pixelated mess with a robot voice that makes Daft Punk jealous on the other end.

Having a chat running at the same time covers a few scenarios:

  • People can tell you when something is wrong on their end or when you stopped being comprehensible
  • People can comment without interrupting your audio flow. Many systems switch the presenter as soon as someone speaks – which is unnecessary in this case.
  • People can post resources without having to interrupt you. “In case you missed it, Jessica is talking about”

Have a consumable backup for each live update
upload and downloadPhoto by
John Trainor

If you are presenting things in the meeting, send out screencasts or slide decks of what you present beforehand. Far too many times you can not see it as a remote participant when someone shares their screens. Switching from presenter to presenter always ends up in a lot of time wasted waiting for the computer to do the thing we want it to.

For the presenter this allows for better explanations of what is happening. It is distracting when you present and press a button and nothing happens. The remote attendees might also have some lag and get a delayed display. This means you talk about something different than they are currently seeing on their screen.

Plan for travel and meeting as a whole team
group hugPhoto by Joris Louwes

Last, but not least, plan to have visits where you meet as a whole team. Do social things together, give people a chance to get to know one another. Once you connected a real human with the flat, blurry face on the screen, things get much easier. Build up a cadence of this. Meet every quarter or twice a year. This might look expensive at first sight, but pays out in team efficiency. My US colleagues had an “a-hah” moment when they were on a laptop late in the evening waiting for others to stop talking about local things they couldn’t care less about. I felt much more empathy for my colleagues once I had to get up much earlier than I wanted to be in the office in time to meet my European colleagues. Let the team walk in each other’s shoes for a while and future meetings will be much smoother.

Categorieën: Mozilla-nl planet

Mozilla Firefox v35 review: Now with speed to match the incredible range of ... - PC Advisor

Nieuws verzameld via Google - di, 24/02/2015 - 09:31

Mozilla Firefox v35 review: Now with speed to match the incredible range of ...
PC Advisor
Read our Mozilla Firefox (v35) review. (Also see: All software reviews.) For many people, Firefox was probably the first alternative browser they ever installed. Launched originally in 2004, the open source offering has been a constant in the browser ...

Categorieën: Mozilla-nl planet

Mike Taylor: WebKitCSSMatrix and and web compatibility stuff

Mozilla planet - di, 24/02/2015 - 07:00

Wow, early January late February 2015, time to blog about more exciting web compatibility bugs.

Lately we've been receiving a number of reports, both in Bugzilla and on, that isn't working in Firefox mobile browsers. With compelling articles like How to blog for cash and How to do your own SEO for your blog or website, this is not a great situation for my fellow Firefox Mobile-using-"how-to-get-rich-by-web-logging" friends.

And now for a brief message from our sponsor, go learn about Art and programming and Mary Cassatt. // TODO(mike): ask jenn for money or how to do SEO.

The biggest obstacle to getting the site to behave is: ReferenceError: WebKitCSSMatrix is not defined. There are few minor CSS issues, but nothing that sprinkling a few unprefixed properties won't solve.

If you're not familiar with WebKitCSSMatrix, Apple has some docs. It's pretty cool (and much nicer than using regular expressions to dice up serialized transform matrices and then doing math and string wrangling yourself). Microsoft even has an equivalent called MSCSSMatrix (which WebKitCSSMatrix is mapped to for compat reasons).

Once upon a time, this thing was specced as CSSMatrix in the CSS3 2D Transforms spec, but eventually was removed (because I forget and am too lazy to search through www-style archives). It returned as a superset of CSSMatrix and SVGMatrix and got the sweet new name of DOMMatrix—which now allows it to be mutuble or immutable, depending on your needs, i.e., do I want a billion new object instances or can I just modify this thing in place.

There's a handful of polyshims available on GitHub if you need them, but the simplest is to just map WebKitCSSMatrix to DOMMatrix, which is supported in Firefox since Gecko 33.

Impress your friends like so:

if (!'WebKitCSSMatrix' in window && window.DOMMatrix) { window.WebKitCSSMatrix = window.DOMMatrix; };

In theory that's cool and useful, but if you do a little bit more digging you'll find that it only gets you so far on the web. Back to, here's the code that powers the PageSlider class here:

function r() { var e = document.defaultView.getComputedStyle(E[0], null), t = new WebKitCSSMatrix(e.webkitTransform); return t.m41 } // some method does W.At = r() // then some other method calls d(W.At + o, 'none') function d(e, t) { var n = 'none' != t ? 'all ' + t + 's ease-out' : 'none'; E[0].style.webkitTransition = n, E[0].style.webkitTransform = 'translate3d(' + e + 'px,0,0)' }

Unfortunately, WebKitCSSMatrix and webkitTransform aren't really possible to tease apart, if you're trying to be compatibile with the deployed web. So a straightforward WebKitCSSMatrix to DOMMatrix mapping won't get you very far.

Categorieën: Mozilla-nl planet

Byron Jones: happy bmo push day!

Mozilla planet - di, 24/02/2015 - 06:23

the following changes have been pushed to

  • [1088086] Possible duplicate search doesn’t return any results if you input “a->b” (for any a/b)
  • [1102364] Add microdata to HTML bugmail so GMail can display a “View bug” button
  • [1130721] Implement support for the attachment author for pronoun substitution in Custom Search
  • [1123275] Changes to form.reps.mentorship

discuss these changes on

Filed under: bmo, mozilla
Categorieën: Mozilla-nl planet

Yunier José Sosa Vázquez: Nueva interfaz para Firefox en tabletas

Mozilla planet - di, 24/02/2015 - 05:32

Nuevamente es martes de actualizaciones para Firefox y tengo el placer de compartir con ustedes las novedades que encontrarán en la nueva versión del panda rojo tanto para escritorios como dispositivos móviles. En este lanzamiento sobresalen la nueva interfaz para las tabletas y la introducción de los primeros cambios hacia una arquitectura multiprocesos.

En aras de mejorar la experiencia de usuario, el nuevo Firefox adquiere un buen balance entre simplicidad y poder al ofrecer una barra de pestañas horizontal y un panel de pestañas a pantalla completa. Diseñada para uso horizontal y vertical, la nueva interfaz permite aprovechar todo el tamaño de pantalla que ofrecen las tabletas disponibles en el mercado.


La introducción de los primeros cambios hacia una arquitectura multiprocesos, hará que Firefox maneje las pestañas, complementos y plugins fuera del proceso principal. Electrolysis (e10s) es el nombre del proyecto que busca añadir esta característica al núcleo del navegador y una vez terminado, proveerá mayor seguridad, estabilidad y, si algo falla, Firefox no se cerrará inesperadamente.

El moderno diseño para las búsquedas ahora debuta en otras localizaciones del navegador más traducido del mundo. Al visitar una página web que sugiera adicionar un motor de búsqueda a Firefox, se mostrará un ícono + en la barra de búsqueda.


Los sitios “fijados” en la página nueva pestaña se podrán sincronizar a través de las cuentas Firefox en todos tus dispositivos. Se ha dado soporte completo a la versión 2 del protocolo HTTP, el cual habilita una web más rápida, escalable y responsiva. También se ha localizado el Panda Rojo en uzbeco gracias a la Comunidad de Usbequistán.

Para Android Lollipop se ha añadido el idioma Maithili (mai).

Otras novedades

Si deseas conocer más, puedes leer las notas de lanzamiento (en inglés).

Puedes obtener esta versión desde nuestra zona de Descargas en español e inglés para Linux, Mac, Windows y Android. Recuerda que para navegar a través de servidores proxy debes modificar la preferencia network.negotiate-auth.allow-insecure-ntlm-v1 a true desde about:config.

Categorieën: Mozilla-nl planet

Planet Mozilla Interns: Michael Sullivan: Forcing memory barriers on other CPUs with mprotect(2)

Mozilla planet - di, 24/02/2015 - 04:36

I have something of an unfortunate fondness for indefensible hacks.

Like I discussed in my last post, RCU is a synchronization mechanism that excels at protecting read mostly data. It is a particularly useful technique in operating system kernels because full control of the scheduler permits many fairly simple and very efficient implementations of RCU.

In userspace, the situation is trickier, but still manageable. Mathieu Desnoyers and Paul E. McKenney have built a Userspace RCU library that contains a number of different implementations of userspace RCU. For reasons I won’t get into, efficient read side performance in userspace seems to depend on having a way for a writer to force all of the reader threads to issue a memory barrier. The URCU library has one version that does this using standard primitives: it sends signals to all other threads; in their signal handlers the other threads issue barriers and indicate so; the caller waits until every thread has done so. This is very heavyweight and inefficient because it requires running all of the threads in the process, even those that aren’t currently executing! Any thread that isn’t scheduled now has no reason to execute a barrier: it will execute one as part of getting rescheduled. Mathieu Desnoyers attempted to address this by adding a membarrier() system call to Linux that would force barriers in all other running threads in the process; after more than a dozen posted patches to LKML and a lot of back and forth, it got silently dropped.

While pondering this dilemma I thought of another way to force other threads to issue a barrier: by modifying the page table in a way that would force an invalidation of the Translation Lookaside Buffer (TLB) that caches page table entries! This can be done pretty easily with mprotect or munmap.

Full details in the patch commit message.

Categorieën: Mozilla-nl planet

Nicholas Nethercote: Fix your damned data races

Mozilla planet - di, 24/02/2015 - 04:27

Nathan Froyd recently wrote about how he has been using ThreadSanitizer to find data races in Firefox, and how a number of Firefox developers — particular in the networking and JS GC teams — have been fixing these.

This is great news. I want to re-emphasise and re-state one of the points from Nathan’s post, which is that data races are a class of bug that almost everybody underestimates. Unless you have, say, authored a specification of the memory model for a systems programming language, your intuition about the potential impact of many data races is probably wrong. And I’m going to give you three links to explain why.

Hans Boehm’s paper How to miscompile programs with “benign” data races explains very clearly that it’s possible to correctly conclude that a data race is benign at the level of machine code, but it’s almost impossible at the level of C or C++ code. And if you try to do the latter by inspecting the code generated by a C or C++ compiler, you are not allowing for the fact that other compilers (including future versions of the compiler you used) can and will generate different code, and so your conclusion is both incomplete and temporary.

Dmitri Vyukov’s blog post Benign data races: what could possibly go wrong? covers similar ground, giving more examples of how compilers can legitimately compile things in surprising ways. For example, at any point the storage used by a local variable can be temporarily used to hold a different variable’s value (think register spilling). If another thread reads this storage in an racy fashion, it could read the value of an unrelated value.

Finally, John Regehr’s blog has many posts that show how C and C++ compilers take advantage of undefined behaviour to do surprising (even shocking) program transformations, and how the extent of these transformations has steadily increased over time. Compilers genuinely are getting smarter, and are increasingly pushing the envelope of what a language will let them get away with. And the behaviour of a C or C++ programs is undefined in the presence of data races. (This is sometimes called “catch-fire” semantics, for reasons you should be able to guess.)

So, in summary: if you write C or C++ code that deals with threads in Firefox — and that probably includes everybody who writes C or C++ code in Firefox — you should have read at least the first two links I’ve given above. If you haven’t, please do so now. If you have read them and they haven’t made you at least slightly terrified, you should read them again. And if TSan identifies a data race in code that you are familiar with, please take it seriously, and fix it. Thank you.

Categorieën: Mozilla-nl planet

Planet Mozilla Interns: Michael Sullivan: Why We Fight

Mozilla planet - di, 24/02/2015 - 04:21
Why We Fight, or Why Your Language Needs A (Good) Memory Model, or The Tragedy Of memory_order_consume’s Unimplementability

This, one of the most terrifying technical documents I’ve ever read, is why we fight:


For background, RCU is a mechanism used heavily in the Linux kernel for locking around read-mostly data structures; that is, data structures that are read frequently but fairly infrequently modified. It is a scheme that allows for blazingly fast read-side critical sections (no atomic operations, no memory barriers, not even any writing to cache lines that other CPUs may write to) at the expense of write-side critical sections being quite expensive.

The catch is that writers might be modifying the data structure as readers access it: writers are allowed to modify the data structure (often a linked list) as long as they do not free any memory removed until it is “safe”. Since writers can be modifying data structures as readers are reading from it, without any synchronization between them, we are now in danger of running afoul of memory reordering. In particular, if a writer initializes some structure (say, a routing table entry) and adds it to an RCU protected linked list, it is important that any reader that sees that the entry has been added to the list also sees the writes that initialized the entry! While this will always be the case on the well-behaved x86 process, architectures like ARM and POWER don’t provide this guarantee.

The simple solution to make the memory order work out is to add barriers on both sides on platforms where it is need: after initializing the object but before adding it to the list and after reading a pointer from the list but before accessing its members (including the next pointer). This cost is totally acceptable on the write-side, but is probably more than we are willing to pay on the read-side. Fortunately, we have an out: essentially all architectures (except for the notoriously poorly behaved Alpha) will not reorder instructions that have a data dependency between them. This means that we can get away with only issuing a barrier on the write-side and taking advantage of the data dependency on the read-side (between loading a pointer to an entry and reading fields out of that entry). In Linux this is implemented with macros “rcu_assign_pointer” (that issues a barrier if necessary, and then writes the pointer) on the write-side and “rcu_dereference” (that reads the value and then issues a barrier on Alpha) on the read-side.

There is a catch, though: the compiler. There is no guarantee that something that looks like a data dependency in your C source code will be compiled as a data dependency. The most obvious way to me that this could happen is by optimizing “r[i ^ i]” or the like into “r[0]”, but there are many other ways, some quite subtle. This document, linked above, is the Linux kernel team’s effort to list all of the ways a compiler might screw you when you are using rcu_dereference, so that you can avoid them.

This is no way to run a railway.

Language Memory Models

Programming by attempting to quantify over all possible optimizations a compiler might perform and avoiding them is a dangerous way to live. It’s easy to mess up, hard to educate people about, and fragile: compiler writers are feverishly working to invent new optimizations that will violate the blithe assumptions of kernel writers! The solution to this sort of problem is that the language needs to provide the set of concurrency primitives that are used as building blocks (so that the compiler can constrain its code transformations as needed) and a memory model describing how they work and how they interact with regular memory accesses (so that programmers can reason about their code). Hans Boehm makes this argument in the well-known paper Threads Cannot be Implemented as a Library.

One of the big new features of C++11 and C11 is a memory model which attempts to make precise what values can be read by threads in concurrent programs and to provide useful tools to programmers at various levels of abstraction and simplicity. It is complicated, and has a lot of moving parts, but overall it is definitely a step forward.

One place it falls short, however, is in its handling of “rcu_dereference” style code, as described above. One of the possible memory orders in C11 is “memory_order_consume”, which establishes an ordering relationship with all operations after it that are data dependent on it. There are two problems here: first, these operations deeply complicate the semantics; the C11 memory model relies heavily on a relation called “happens before” to determine what writes are visible to reads; with consume, this relation is no longer transitive. Yuck! Second, it seems to be nearly unimplementable; tracking down all the dependencies and maintaining them is difficult, and no compiler yet does it; clang and gcc both just emit barriers. So now we have a nasty semantics for our memory model and we’re still stuck trying to reason about all possible optimizations. (There is work being done to try to repair this situation; we will see how it turns out.)

Shameless Plug

My advisor, Karl Crary, and I are working on designing an alternate memory model (called RMC) for C and C++ based on explicitly specifying the execution and visibility constraints that you depend on. We have a paper on it and I gave a talk about it at POPL this year. The paper is mostly about the theory, but the talk tried to be more practical, and I’ll be posting more about RMC shortly. RMC is quite flexible. All of the C++11 model apart from consume can be implemented in terms of RMC (although that’s probably not the best way to use it) and consume style operations are done in a more explicit and more implementable (and implemented!) way.

Categorieën: Mozilla-nl planet

Mozilla WebDev Community: Beer and Tell – February 2015

Mozilla planet - ma, 23/02/2015 - 22:06

Once a month, web developers from across the Mozilla Project get together to speedrun classic video games. Between runs, we find time to talk about our side projects and drink, an occurrence we like to call “Beer and Tell”.

There’s a wiki page available with a list of the presenters, as well as links to their presentation materials. There’s also a recording available courtesy of Air Mozilla.

Michael Kelly: Refract

Osmose (that’s me!) started off with Refract, a website that can turn any website into an installable application. It does this by generating an Open Web App on the fly that does nothing but redirect to the specified site as soon as it is opened. The name and icon of the generated app are auto-detected from the site, or they can be customized by the user.

Michael Kelly: Sphere Online Judge Utility

Next, Osmose shared spoj, a Python-based command line tool for working on problems from the Sphere Online Judge. The tool lets you list and read problems, as well as create solutions and test them against the expected input and output.

Adrian Gaudebert: Spectateur

Next up was adrian, who shared Spectateur, a tool to run reports against the Crash-Stats API. The webapp lets you set up a data model using attributes available from the API, and then process that data via JavaScript that the user provides. The JavaScript is executed in a sandbox, and the resulting view is displayed at the bottom of the page. Reports can also be saved and shared with others.

Peter Bengtsson: Autocompeter

Peterbe stopped by to share Autocompeter, which is a service for very fast auto-completion. Autocompeter builds upon peterbe’s previous work with fast autocomplete backed by Redis. The site is still not production-ready, but soon users will be able to request an API key to send data to the service for indexing, and Air Mozilla will be one of the first sites using it.

Pomax: inkdb

The ever-productive Pomax returns with, a combination of the many color- and ink-related tools he’s been sharing recently. Among other things, inkdb lets you browse fountain pen inks, map them on a graph based on similarity, and find inks that match the colors in an image. The website is also a useful example of the Mozilla Foundation Client-side Prototype in action.

Matthew Claypotch: rockbot

Lastly, potch shared a web interface for suggesting songs to a Rockbot station. Rockbot currently only has Android and iOS apps, and potch decided to create a web interface to allow people without Rockbot accounts or phones to suggest songs.

No one could’ve anticipated willkg’s incredible speedrun of Mario Paint. When interviewed after his blistering 15 hour and 24 minute run, he refused to answer any questions and instead handed out fliers for the grand opening of his cousin’s Inkjet Cartridge and Unlicensed Toilet Tissue Outlet opening next Tuesday at Shopper’s World on Worcester Road.

If you’re interested in attending the next Beer and Tell, sign up for the mailing list. An email is sent out a week beforehand with connection details. You could even add yourself to the wiki and show off your side-project!

See you next month!

Categorieën: Mozilla-nl planet

Nick Cameron: Creating a drop-in replacement for the Rust compiler

Mozilla planet - ma, 23/02/2015 - 21:33
Many tools benefit from being a drop-in replacement for a compiler. By this, I mean that any user of the tool can use `mytool` in all the ways they would normally use `rustc` - whether manually compiling a single file or as part of a complex make project or Cargo build, etc. That could be a lot of work; rustc, like most compilers, takes a large number of command line arguments which can affect compilation in complex and interacting ways. Emulating all of this behaviour in your tool is annoying at best, especially if you are making many of the same calls into librustc that the compiler is.

The kind of things I have in mind are tools like rustdoc or a future rustfmt. These want to operate as closely as possible to real compilation, but have totally different outputs (documentation and formatted source code, respectively). Another use case is a customised compiler. Say you want to add a custom code generation phase after macro expansion, then creating a new tool should be easier than forking the compiler (and keeping it up to date as the compiler evolves).

I have gradually been trying to improve the API of librustc to make creating a drop-in tool easier to produce (many others have also helped improve these interfaces over the same time frame). It is now pretty simple to make a tool which is as close to rustc as you want it to be. In this tutorial I'll show how.

Note/warning, everything I talk about in this tutorial is internal API for rustc. It is all extremely unstable and likely to change often and in unpredictable ways. Maintaining a tool which uses these APIs will be non- trivial, although hopefully easier than maintaining one that does similar things without using them.

This tutorial starts with a very high level view of the rustc compilation process and of some of the code that drives compilation. Then I'll describe how that process can be customised. In the final section of the tutorial, I'll go through an example - stupid-stats - which shows how to build a drop-in tool.

Continue reading on GitHub...

Categorieën: Mozilla-nl planet