This causes an exception. However, when I call the same thing with GL_LUMINANCE replacing GL_LUMINANCE_ALPHA I get the correct texture, with a black background.
My guess is that you don’t have two channels, one for luminance and one for alpha, but only one channel. OpenGL then tries to access parts of the texture that is outside the allocated memory.