I just noticed
With a document that does not have the SC_DOCUMENTOPTION_TEXT_LARGE option set, allocating more than 2G (calling SCI_ALLOCATE or similar) will now fail with SC_STATUS_FAILURE.
in 5.4.1 release notes. I'm not sure how geany behaves for large files and whether we should set this flag or not.