[
https://issues.apache.org/jira/browse/THRIFT-365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12681484#action_12681484
]
Aaron T. Myers commented on THRIFT-365:
---------------------------------------
I've figured out the cause, and it should only affect 64-bit systems. Patch
below.
diff --git a/compiler/cpp/src/generate/t_html_generator.cc
b/compiler/cpp/src/generate/t_html_generator.cc
index 6e0fdba..6b8bcc1 100644
--- a/compiler/cpp/src/generate/t_html_generator.cc
+++ b/compiler/cpp/src/generate/t_html_generator.cc
@@ -317,7 +317,7 @@ void t_html_generator::generate_css() {
void t_html_generator::print_doc(t_doc* tdoc) {
if (tdoc->has_doc()) {
string doc = tdoc->get_doc();
- unsigned int index;
+ size_t index;
while ((index = doc.find_first_of("\r\n")) != string::npos) {
if (index == 0) {
f_out_ << "<p/>" << endl;
> HTML compiler infinite loop
> ---------------------------
>
> Key: THRIFT-365
> URL: https://issues.apache.org/jira/browse/THRIFT-365
> Project: Thrift
> Issue Type: Bug
> Environment: Ubuntu Linux 2.6.24-22-generic
> Reporter: Aaron T. Myers
> Attachments: amie_api.thrift
>
>
> When I attempt to run the HTML documentation generator on the following
> .thrift file, the generator writes 48 lines of legitimate HTML and then
> begins to spin writing nothing but newline characters to the generated HTML
> file. It will continue to do this until the process is killed.
> Contents of .thrift file:
> php_namespace api
> namespace as3 com.amiestreet.api
> enum AmieApiErrorCode {
> API_EC_UNKNOWN = 0
> API_EC_METHOD = 1
> API_EC_BADFINGERPRINT = 2
> API_EC_ARTIST_ALREADY_EXISTS = 3
> API_EC_USER_NOT_FOUND = 4
> API_EC_SONG_NOT_FOUND = 5
> API_EC_ALBUM_NOT_FOUND = 6
> API_EC_ARTIST_NOT_FOUND = 7
> API_EC_PLAYLIST_NOT_FOUND = 8
> API_EC_ALBUM_ALREADY_EXISTS = 9
> API_EC_SONG_ALREADY_EXISTS = 10
> API_EC_LOGIN_REQUIRED = 11
> API_EC_REC_NOT_FOUND = 12
> API_EC_SEARCH_ERROR = 13
> API_EC_SEARCH_FIND_MISMATCH = 14
> API_EC_SEARCH_FIND_ARTIST_REQUIRED = 15
> }
> typedef string errorMessage
> typedef string userFingerprint
> /**
> * The id, name or dasherized name of an artist.
> * Examples:
> * - The Walkmen
> * - the-walkmen
> * - 6KNMnd6NoOUx
> */
> typedef string artistIdentifierRef
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.